Move method example
The following example demonstrates moving all the controls on a form by using the Move method with the Controls collection. The user clicks on the CommandButton to move the controls.
To use this example, copy this sample code to the Declarations portion of a form. Make sure that the form contains a CommandButton named CommandButton1 and several other controls.
Private Sub CommandButton1_Click()
'Move each control on the form right 25 points
'and up 25 points.
Controls.Move 25, -25
End Sub
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.