Share via


Windows Collection Object

Application
Aa168110.parmult(en-us,office.10).gifWorkbooks (Workbook)
Aa168110.parchild(en-us,office.10).gifAa168110.parshare(en-us,office.10).gifWindows (Window)
Aa168110.space(en-us,office.10).gifAa168110.space(en-us,office.10).gifAa168110.parchild(en-us,office.10).gifPanes (Pane)

A collection of all the Window objects in Microsoft Excel. The Windows collection for the Application object contains all the windows in the application, whereas the Windows collection for the Workbook object contains only the windows in the specified workbook.

Using the Windows Collection

Use the Windows property to return the Windows collection. The following example cascades all the windows that are currently displayed in Microsoft Excel.

  Windows.Arrange arrangeStyle:=xlCascade

Use the NewWindow method to create a new window and add it to the collection. The following example creates a new window for the active workbook.

  ActiveWorkbook.NewWindow

Use Windows(index), where index is the window name or index number, to return a single Window object. The following example maximizes the active window.

  Windows(1).WindowState = xlMaximized

Note that the active window is always Windows(1).