viper2843
08-22-2003, 04:15 PM
I need some help writing a program. I wrote a little demo program to ask for help. I need to pass the wApp to the class file.
Dim WithEvents wApp As Word.Application
Dim TestClass As Class1
Private Sub AddinInstance_OnConnection(ByVal Application As Object, ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As Object, custom() As Variant)
Set wApp = Application
Call TestClass.LoadToolbar(wApp)
End Sub
Here is the class file:
Public Sub LoadToolbar(ByVal HostApp As Application)
MsgBox ("Test")
End Sub
I am sort of new at this so can anyone help me?
Dim WithEvents wApp As Word.Application
Dim TestClass As Class1
Private Sub AddinInstance_OnConnection(ByVal Application As Object, ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As Object, custom() As Variant)
Set wApp = Application
Call TestClass.LoadToolbar(wApp)
End Sub
Here is the class file:
Public Sub LoadToolbar(ByVal HostApp As Application)
MsgBox ("Test")
End Sub
I am sort of new at this so can anyone help me?