by Aadish Tiwari (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 23rd January 2002
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
Creating forms at run time
API Declarations
'place a text box and a command button over it
'the text box will hold value i.e the no of the forms to create and clicking
'the command button will create the forms
Dim i As Integer
Private Sub Command1_Click()
For i = 1 To Text1.Text ' run the loop from 1 to text1.text no of times
Dim frm2 As frm1 ' create the new instance of form
Set frm2 = New frm1 ' create a new form
frm2.Show ' show new form
Next
End Sub