MoveSize Method [Access 2003 VBA Language Reference]

The MoveSize method carries out the MoveSize action in Visual Basic.

expression.MoveSize(Right, Down, Width, Height)

expression Required. An expression that returns one of the objects in the Applies To list.

Right  Optional Variant. A numeric expression.

Down  Optional Variant. A numeric expression.

Width  Optional Variant. A numeric expression.

Height  Optional Variant. A numeric expression.


For more information on how the action and its arguments work, see the action topic.

You must include at least one argument for the MoveSize method. If you leave an argument blank, the current setting for the window is used.

You can leave an optional argument blank in the middle of the syntax, but you must include the argument's comma. If you leave one or more trailing arguments blank, don't use a comma following the last argument you specify.

The units for the arguments are twips.


The following example moves the active window and changes its height, but leaves its width unchanged:

DoCmd.MoveSize 1440, 2400, , 2000

Applies to | DoCmd Object