Add a command button and a text box to a form. Set the text boxes index property to 0 then add this code
Private Sub Command1_Click()
Dim i As Long
For i = 1 To 5
Load Text1(i)
Text1(i).Move Text1(i - 1).Left, Text1(i - 1).Top + Text1(i - 1).Height
Text1(i).Visible = True
Next
End Sub
Hope this helps If you choose to battle wits with the witless be prepared to lose.
Ok. On your form you need atleast one instance of a textbox with an index set to 0. Use the default name (text1) to use it with the code below. Hope it is useful. I have added it to a click event of a command button.
Private Sub Command1_Click()
Dim intNextVal As Integer
'find next available index
intNextVal = Text1().Count
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.