S
Scott
I have defined several classes in my form script and I
want to use them to hold information during the processing
of the form. The initialization of the form is good but I
can't seem to assign data to the class properties.
Class MyClass
private someProp
private CID
Public Property Let ThisProp(byval NewVal)
someProp=NewVal
End Property
Public Property Get ThisProp()
ThisProp=someProp
End Property
Private Sub Class_Initialize()
CID="MyClass" & Timer
End Sub
Property Get ClassID()
ClassID=CID
End Property
End Class
..
Dim aClass
Set aClass=New MyClass
MsgBox "The class ID = " & aClass.ClassID
aClass.ThisProp="SomeStuff"
MsgBox "The Stuff =" aClass.ThisProp
The first Msgbox displays the ID just fine. The second
shows an empty varaiable.
Is there something wrong here?
Thanks for your help.
Scott
want to use them to hold information during the processing
of the form. The initialization of the form is good but I
can't seem to assign data to the class properties.
Class MyClass
private someProp
private CID
Public Property Let ThisProp(byval NewVal)
someProp=NewVal
End Property
Public Property Get ThisProp()
ThisProp=someProp
End Property
Private Sub Class_Initialize()
CID="MyClass" & Timer
End Sub
Property Get ClassID()
ClassID=CID
End Property
End Class
..
Dim aClass
Set aClass=New MyClass
MsgBox "The class ID = " & aClass.ClassID
aClass.ThisProp="SomeStuff"
MsgBox "The Stuff =" aClass.ThisProp
The first Msgbox displays the ID just fine. The second
shows an empty varaiable.
Is there something wrong here?
Thanks for your help.
Scott