Notitie
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen u aan te melden of de directory te wijzigen.
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen de mappen te wijzigen.
Moves the active document window.
Syntax
expression.Move (Left, Top)
expression A variable that represents a Window object.
Parameters
| Name | Required/Optional | Data type | Description |
|---|---|---|---|
| Left | Required | Long | The horizontal screen position of the specified window. |
| Top | Required | Long | The vertical screen position of the specified window. |
Remarks
If the application window is either maximized or minimized, this method returns an error.
Example
This example checks the state of the application window, and if it is neither maximized nor minimized, moves the window to the upper-left corner of the screen.
Sub MoveWindow()
With ActiveWindow
If .WindowState = pbWindowStateNormal Then
.Move Left:=50, Top:=50
End If
End With
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.