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