Welcome to VBF!![]()
Not sure what that array is for ... however what you can do is create a control array (paste one textbox on the form in design and set its Index = 0) and at runtime simply create new instance as follows (you did attempted):
NOTE: there is another technic exist (controls collection) but using control array might be much easier to handle:VB Code:
With frmServer For i = 1 To intSomeUbound 'control array member with index 0 already exist Load .Text1(i) .Text1(i).Move iLeft, iTop 'determine correct position 'you may need to set text property here 'you may need to set TAG property here so you can determine later what is what .Text1(i).Visible = True Next End With
VB Code:
Private Sub Text1_Change(Index As Integer) Select Case Index 'or Text1(Index).Tag (or some other identifier) Case 0 'do something End Select End Sub




Reply With Quote