I was experimenting with different ways I could use Control arrays in run time. One formula I could not work out was, How do I add control arrays in increments of x
The below code illustrates how to add the textbox array 1 at a time during run time.
But I could not work out how to add 2 or 3 at a time. I tried to loop, but each time it said control element(x) doesnt exist.
Could someone help explain the procedure
thx
Private Sub Command1_Click(Index As Integer)
Select Case Index
Dim Boxadd As Integer, Boxremove As Integer, i As Integer
Case 0
Boxadd = txtData().Count
If Boxadd < 5 Then
Load txtData(Boxadd)
txtData(Boxadd).Top = txtData(Boxadd - 1).Top + 400
txtData(Boxadd).Visible = True
End If
Case 1
Unload me
End Select
End Sub
The below code illustrates how to add the textbox array 1 at a time during run time.
But I could not work out how to add 2 or 3 at a time. I tried to loop, but each time it said control element(x) doesnt exist.
Could someone help explain the procedure
thx
Private Sub Command1_Click(Index As Integer)
Select Case Index
Dim Boxadd As Integer, Boxremove As Integer, i As Integer
Case 0
Boxadd = txtData().Count
If Boxadd < 5 Then
Load txtData(Boxadd)
txtData(Boxadd).Top = txtData(Boxadd - 1).Top + 400
txtData(Boxadd).Visible = True
End If
Case 1
Unload me
End Select
End Sub