Export (0) Print
Expand All

DoCmd.MoveSize Method

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

Syntax

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

expression   A variable that represents a DoCmd object.

Parameters

NameRequired/OptionalData TypeDescription
RightOptionalVariantThe new horizontal position of the window's upper-left corner, measured from the left edge of its containing window.
DownOptionalVariantThe new vertical position of the window's upper-left corner, measured from the top edge of its containing window.
WidthOptionalVariantThe window's new width.
HeightOptionalVariantThe window's new height.

Remarks

You can use the MoveSize method to move or resize the active window.

The units for the arguments are twips.

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.

Example

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

Visual Basic for Applications
DoCmd.MoveSize 1440, 2400, , 2000


Community Additions

ADD
Show:
© 2014 Microsoft