|
The way upstairs is also good.
In fact, VB can also generate controls dynamically, but it cannot generate control arrays. If you want to use control arrays, you need to reorganize it yourself.
Option Explicit
Dim WithEvents text1 As VB.TextBox
Dim text2 As VB.TextBox
Private Sub Form_Load ()
Set text1 = Controls.Add ("VB.TextBox", "text1")
text1.Visible = True
Set text2 = Controls.Add ("VB.TextBox", "text21")
text2.Visible = True
text2.Top = 500
End Sub |
|