Option ExplicitPrivate Sub setpos(a As Variant)
Dim i As Integer
For i = 0 To 4
a(i).Left = 500 * i
a(i).Top = 0
a(i).Width = 400
a(i).Height = 300
Next i
End SubPrivate Sub Command2_Click()
setpos Command1
End Sub
Dim i As Integer
For i = 0 To 4
a(i).Left = 500 * i
a(i).Top = 0
a(i).Width = 400
a(i).Height = 300
Next i
End SubPrivate Sub Command2_Click()
setpos Command1
End Sub
Dim i As Interger
For i = 0 To 5
MsgBox Choose(Index + 1, button0(i).Width, button1(i).Width, button2(i).Width, button3(i).Width)
Next i
End Sub