How to add Controls at Run-Time
Posted on January 5, 2009
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 'Controls - How to add Controls at Run-Time Option Explicit 'Add TextBox to your form. 'In the textbox Property change the Index propery to 0 Private Sub Form_Load() Load Text1(1) Text1(1).Left = 400 Text1(1).Top = 400 Text1(1).Visible = True 'To add another textbox, simply add: 'Load Text1(2) 'Text1(2).Left = 400 'Text1(2).Top = 200 'Text1(2).Visible = True 'And so on ... End Sub |