请问怎么动态的增加控件数组元素,在线等ing........
Private Sub Form_Load()
On Error Resume Next
For i = 0 To 3
Set Command(i) = Controls.Add("vb.commandbutton", "command(i)")
With Command(i)
.Visible = True
.Width = 2000
.Caption = "Hello"
.Top = Command(i - 1) + 300
.Left = Command(i - 1) + 300
End With
Next
End Sub
我这样怎么不可以啊??