O
oli
Hello,
I try to use a class, defined in a .xla, in a Excel-Spreadsheet. The
class is defined with instancing PubicNotCreate and have a public
method for the object creation. The reference is done in the .xls, so I
can see the class with her method in the object and project explorer.
-In the .xla:-
Public Function newKlasse1()
Set newKlasse1 = New Klasse1
End Function
Public Property Get helloWorld() As String
Message = "Hello world from klasse1"
End Property
-In the .xls:-
Private Sub test_klass()
Dim anObj As Klasse1
Set anObj = *newKlasse1()*
Debug.Print "From klasse1 : " & anObject.helloWorld
End Sub
By running test_klass I get a compilation error, newKlasse1 is not
defined.
What is the problem ?
Thanks.
Olivier
I try to use a class, defined in a .xla, in a Excel-Spreadsheet. The
class is defined with instancing PubicNotCreate and have a public
method for the object creation. The reference is done in the .xls, so I
can see the class with her method in the object and project explorer.
-In the .xla:-
Public Function newKlasse1()
Set newKlasse1 = New Klasse1
End Function
Public Property Get helloWorld() As String
Message = "Hello world from klasse1"
End Property
-In the .xls:-
Private Sub test_klass()
Dim anObj As Klasse1
Set anObj = *newKlasse1()*
Debug.Print "From klasse1 : " & anObject.helloWorld
End Sub
By running test_klass I get a compilation error, newKlasse1 is not
defined.
What is the problem ?
Thanks.
Olivier