M
Mike
From project "VBAProject(Book1.xlsm):"I am trying to access sub
"subInNewClass" in a new class that is in Project "newclass(class
test.xlsm)". Both methods below produce errors.
Any help would be appreciated.
-----------------------------------
In Project newclass(class test.xlsm)
In Class Module Class1:
Option Explicit
Public Sub subInNewClass()
MsgBox "I'm in"
End Sub
In VBAProject(Book1.xlsm):
Set reference to Project newclass
In Userform1
Option Explicit
Dim qq As New Class1
Private Sub UserForm_Click()
qq.subInNewClass
End Sub
-----------------------------------------------------------
I also tried:
Option Explicit
Dim qq As Class1
Dim kk
Private Sub UserForm_Click()
Set kk = qq
kk.subInNewClass
End Sub
"subInNewClass" in a new class that is in Project "newclass(class
test.xlsm)". Both methods below produce errors.
Any help would be appreciated.
-----------------------------------
In Project newclass(class test.xlsm)
In Class Module Class1:
Option Explicit
Public Sub subInNewClass()
MsgBox "I'm in"
End Sub
In VBAProject(Book1.xlsm):
Set reference to Project newclass
In Userform1
Option Explicit
Dim qq As New Class1
Private Sub UserForm_Click()
qq.subInNewClass
End Sub
-----------------------------------------------------------
I also tried:
Option Explicit
Dim qq As Class1
Dim kk
Private Sub UserForm_Click()
Set kk = qq
kk.subInNewClass
End Sub