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 has the following arguments.

Argument

Description

right

A numeric expression.

down

A numeric expression.

width

A numeric expression.

height

A 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

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

DoCmd.MoveSize 1440, 2400, , 2000