MoveSize Method

Applies To

DoCmd Object.

Description

The MoveSize method carries out the MoveSize action in Visual Basic. For more information on how the action and its arguments work, see the action topic.

Syntax

DoCmd.MoveSize [ right] [, down] [, width] [, height]

The MoveSize method uses the following arguments.

Argument

Description

right

Numeric expression

down

Numeric expression

width

Numeric expression

height

Numeric expression


Remarks

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.

See Also

DoCmd Object, MoveSize Action, Resize Event, Restore Method, SelectObject Method.

Example

This example moves the active window and changes its height, but leaves its width unchanged.


DoCmd.MoveSize 1440, 2400, , 2000