Arrange Method

Microsoft Excel Visual Basic

Arranges the windows on the screen. Varint.

expression.Arrange(ArrangeStyle, ActiveWorkbook, SyncHorizontal, SyncVertical)

expression    Required. An expression that returns one of the objects in the Applies To list

ArrangeStyle   Optional XlArrangeStyle.

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.

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.

Example

This example tiles all the windows in the application.

Application.Windows.Arrange ArrangeStyle:=xlArrangeStyleTiled