deepak_warrier
October 11th, 1999, 02:51 PM
I am not able to add user classes to a Collection.
In Class module Class1, put
option Explicit
Dim m_a as Byte
public property get A() as Byte
m_a = A
End property
public property let A(byval vNewValue as Byte)
m_a = vNewValue
End property
And in the form module Form1, put
ption Explicit
private Sub Form_Load()
Dim col as new Collection
Dim byte1 as new Class1, byte2 as new Class1
byte1.A = 12
byte2.A = 25
col.Add byte1
col.Add byte2
End Sub
When I debug, the contents of the items in the class are 0. What's up?
Deepak
In Class module Class1, put
option Explicit
Dim m_a as Byte
public property get A() as Byte
m_a = A
End property
public property let A(byval vNewValue as Byte)
m_a = vNewValue
End property
And in the form module Form1, put
ption Explicit
private Sub Form_Load()
Dim col as new Collection
Dim byte1 as new Class1, byte2 as new Class1
byte1.A = 12
byte2.A = 25
col.Add byte1
col.Add byte2
End Sub
When I debug, the contents of the items in the class are 0. What's up?
Deepak