|
-
October 11th, 1999, 02:51 PM
#1
Adding User Classes to Collection Control
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
-
October 11th, 1999, 06:44 PM
#2
Re: Adding User Classes to Collection Control
public property get A() as Byte
' m_a = A ' replace this line
A = m_a
End property
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|