September 21st, 1999, 04:41 PM
How to write a user define type of Collection? The following code won't work.
Type EmployeeRecord
ID As Integer
Name As String
Address As String
End Type
Sub CreateRecord()
Dim MyRecord As EmployeeRecord
Dim MyCollection As Collection
MyRecord.ID = 12003 ' Assign a value to an element.
Set MyCollection = new Collection
MyCollection.Add(MyRecord)
End Sub
Type EmployeeRecord
ID As Integer
Name As String
Address As String
End Type
Sub CreateRecord()
Dim MyRecord As EmployeeRecord
Dim MyCollection As Collection
MyRecord.ID = 12003 ' Assign a value to an element.
Set MyCollection = new Collection
MyCollection.Add(MyRecord)
End Sub