01-20-2005, 08:49 PM
I have a new program idea that requires me to somehow load forms, but of course "Load frmMain(Index)" wouldn't work because you can't give forms indexes (or can you)?
Does anyone know a way I can do this still?
Dim myForm(4) As Form
Dim i As Integer
For i = LBound(myForm) To UBound(myForm)
Set myForm(i) = New Form1
I just tried that and it worked.
Form1 is a normal Form with a CommandButton CommandButton1 on it :D
01-21-2005, 11:14 PM
you can't give forms indexes (or can you)?
All created forms in Visual Basic are part of a forms collection. You can access a particular form using it's collection index.
Interested in reading more: