Hi,
Please find the code below to create VB Controls/Array of Controls Dynamically
Dim ControlArrayCOunt As Integer
Dim txtControlArray() As TextBox
Private Sub Create_Control()
On Error GoTo a
Dim txtControl As TextBox
Set txtControl = Controls.Add("VB.TextBox", "txtControl")
txtControl.Top = 300
txtControl.Left = 200
txtControl.Visible = True
Exit Sub
a:
End Sub
'Command Button to create Control Once Dynamically
Private Sub Command1_Click()
Call Create_Control
End Sub
'Command Button to create Control array Dynamically
Private Sub Command2_Click()
ControlArrayCOunt = ControlArrayCOunt + 1
Call Create_ControlArray
End Sub