>Say I have cEmployee class and I want to create another instance on the fly, how would I do that? Other than:
>
>Set oCEO as new cEmployee
>Set oDeveloper as new cEmployee
>Set oJanitor as new cEmployee
>
>Maybe a collection of custom class objects are what I need but I am not sure how to, or even if, that is the answer...
For collection, you need a collection object and then you add your instances to the collection.
Dim x as Collection
Dim Y as cEmployee
Set X = New Collection
'Add a first employee
Set Y = new cEmployee
y. .... = ....
y. .... = ....
x.add y
'Add a second employee
Set Y = new cEmployee
y. .... = ....
y. .... = ....
x.add y
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com