Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create instances for a class?

Status
Not open for further replies.

pichi

Programmer
Nov 12, 2000
156
EC
Hi everybody, i don't know how to do this, i hope someone could help me, i want to create a class, that contains a form, and in execution mode create some instances of that class and link them to an array so i can make reference to them.
Sorry for my english!!
any help would be appreciated, thanks in advance!!

Juan Pablo
 
A form is more or less a one object class. To instantiate it you can use the following code:

Dim frmOne as Form1
Dim frmTwo as Form1

Set frmOne = New Form1
frmOne.Show

...

Set frmTwo = New Form1
frmTwo.Show

...

Unload frmTwo
Set frmTwo = Nothing
Unload frmOne
Set frmOne = Nothing


To better structure your program, you can create a Collection into which you add the different forms.


_________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top