Windows.Arrange Method (Excel)
Arranges the windows on the screen.
Syntax
expression .Arrange(ArrangeStyle, ActiveWorkbook, SyncHorizontal, SyncVertical)
expression A variable that represents a Windows object.
Parameters
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
ArrangeStyle |
Optional |
One of the constants of XlArrangeStyle specifying how the windows are arranged. |
|
ActiveWorkbook |
Optional |
Variant |
True to arrange only the visible windows of the active workbook. False to arrange all windows. The default value is False. |
SyncHorizontal |
Optional |
Variant |
Ignored if ActiveWorkbook is False or omitted. True to synchronize the windows of the active workbook when scrolling horizontally. False to not synchronize the windows. The default value is False. |
SyncVertical |
Optional |
Variant |
Ignored if ActiveWorkbook is False or omitted. True to synchronize the windows of the active workbook when scrolling vertically. False to not synchronize the windows. The default value is False. |
Return Value
Variant
Remarks
XlArrangeStyle can be one of these XlArrangeStyle constants. |
xlArrangeStyleCascade. Windows are cascaded. |
xlArrangeStyleTiled default. Windows are tiled |
xlArrangeStyleHorizontal. Windows are arranged horizontally. |
xlArrangeStyleVertical. Windows are arranged vertically. |
Example
This example tiles all the windows in the application.
Application.Windows.Arrange ArrangeStyle:=xlArrangeStyleTiled