有意思的问题,来拿分!!
我在form1上放了3个button,分别是command1(0),command1(1),command2
然后写了如下代码:
Private Sub Form_Load()
Dim mycontrol As Control
Set mycontrol = Form1.Controls("command2")
mycontrol.Caption = "111"
End Sub
但是如果把第3行改为:
Set mycontrol = Form1.Controls("command1")
或
Set mycontrol = Form1.Controls("command1(0)")
就不行,请帮我实现怎么来控制这个控件数组!!