Window Object
Description
Represents a window. Many worksheet characteristics, such as scroll bars and gridlines, are actually properties of the window. The Window object is a member of the Windows collection. 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 Window Object
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).
The window caption is the text shown in the title bar at the top of the window when the window isn't maximized. The caption is also shown in the list of open files on the bottom of the Windows menu. Use the Caption property to set or return the window caption. Changing the window caption doesn't change the name of the workbook. The following example turns off cell gridlines for the worksheet shown in the Book1.xls:1 window.
Windows("Book1.xls":1).DisplayGridlines = False
Properties
ActiveCell property, ActiveChart property, ActivePane property, ActiveSheet property, Application property, Caption property, Creator property, DisplayFormulas property, DisplayGridlines property, DisplayHeadings property, DisplayHorizontalScrollBar property, DisplayOutline property, DisplayRightToLeft property, DisplayVerticalScrollBar property, DisplayWorkbookTabs property, DisplayZeros property, EnableResize property, FreezePanes property, GridlineColor property, GridlineColorIndex property, Height property, Index property, Left property, OnWindow property, Panes property, Parent property, RangeSelection property, ScrollColumn property, ScrollRow property, SelectedSheets property, Selection property, Split property, SplitColumn property, SplitHorizontal property, SplitRow property, SplitVertical property, TabRatio property, Top property, Type property, UsableHeight property, UsableWidth property, View property, Visible property, VisibleRange property, Width property, WindowNumber property, WindowState property, Zoom property.
Methods
Activate method, ActivateNext method, ActivatePrevious method, Close method, LargeScroll method, NewWindow method, PrintOut method, PrintPreview method, ScrollWorkbookTabs method, SmallScroll method.