Window Window Window Interface

Definition

Represents a window. Many worksheet characteristics, such as scroll bars and gridlines, are actually properties of the window.

public interface class Window
[System.Runtime.InteropServices.Guid("00020893-0000-0000-C000-000000000046")]
[System.Runtime.InteropServices.InterfaceType(2)]
public interface Window
Public Interface Window
Attributes

Remarks

The Window object is a member of the Windows collection. The Windows collection returned by the Windows property of the Application object contains all the windows in the application, whereas the Windows collection returned by the Windows property of the Workbook object contains only the windows in the specified workbook.

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

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.

Properties

_DisplayRightToLeft _DisplayRightToLeft _DisplayRightToLeft

Reserved for internal use.

ActiveCell ActiveCell ActiveCell

Returns a Range object that represents the active cell in the active window (the window on top) or in the specified window. If the window isn't displaying a worksheet, this property fails.

ActiveChart ActiveChart ActiveChart

Returns a Chart object that represents the active chart (either an embedded chart or a chart sheet). An embedded chart is considered active when it's either selected or activated. When no chart is active, this property returns Nothing.

ActivePane ActivePane ActivePane

Returns a Pane object that represents the active pane in the window.

ActiveSheet ActiveSheet ActiveSheet

Returns an object that represents the active sheet (the sheet on top) in the active workbook or in the specified window or workbook. Returns Nothing if no sheet is active.

ActiveSheetView ActiveSheetView ActiveSheetView

Returns an object that represents the view of the active sheet in the specified window. Read-only.

Application Application Application

Returns an Application object that represents the Excel application.

AutoFilterDateGrouping AutoFilterDateGrouping AutoFilterDateGrouping

True if the auto filter for date grouping is currently displayed in the specified window. Read/write.

Caption Caption Caption

The name that appears in the title bar of the document window.

Creator Creator Creator

Returns a 32-bit integer that indicates the application in which this object was created.

DisplayFormulas DisplayFormulas DisplayFormulas

True if the window is displaying formulas; False if the window is displaying values.

DisplayGridlines DisplayGridlines DisplayGridlines

True if gridlines are displayed.

DisplayHeadings DisplayHeadings DisplayHeadings

True if both row and column headings are displayed; False if there are no headings displayed.

DisplayHorizontalScrollBar DisplayHorizontalScrollBar DisplayHorizontalScrollBar

True if the horizontal scroll bar is displayed.

DisplayOutline DisplayOutline DisplayOutline

True if outline symbols are displayed.

DisplayRightToLeft DisplayRightToLeft DisplayRightToLeft

True if the specified window is displayed from right to left instead of from left to right. False if the object is displayed from left to right.

DisplayRuler DisplayRuler DisplayRuler

True if a ruler is displayed for the specified window. Read/write.

DisplayVerticalScrollBar DisplayVerticalScrollBar DisplayVerticalScrollBar

True if the vertical scroll bar is displayed.

DisplayWhitespace DisplayWhitespace DisplayWhitespace

True if whitespace is displayed. Read/write.

DisplayWorkbookTabs DisplayWorkbookTabs DisplayWorkbookTabs

True if the workbook tabs are displayed.

DisplayZeros DisplayZeros DisplayZeros

True if zero values are displayed.

EnableResize EnableResize EnableResize

True if the window can be resized.

FreezePanes FreezePanes FreezePanes

True if split panes are frozen.

GridlineColor GridlineColor GridlineColor

Returns or sets the gridline color as an RGB value.

GridlineColorIndex GridlineColorIndex GridlineColorIndex

Returns or sets the gridline color as an index into the current color palette or as an XlColorIndex constant.

Height Height Height

The height of the window in points.

Hwnd Hwnd Hwnd

Returns the window handle of the specified window.

Index Index Index

Returns the index number of the object within the collection of similar objects.

Left Left Left

The distance in points from the left edge of the client area to the left edge of the window.

OnWindow OnWindow OnWindow

Returns or sets the name of the procedure that’s run whenever you activate a window.

Panes Panes Panes

Returns a Panes collection that represents all the panes in the specified window.

Parent Parent Parent

Returns the parent object for the specified object.

RangeSelection RangeSelection RangeSelection

Returns a Range object that represents the selected cells on the worksheet in the specified window even if a graphic object is active or selected on the worksheet.

ScrollColumn ScrollColumn ScrollColumn

Returns or sets the number of the leftmost column in the pane or window.

ScrollRow ScrollRow ScrollRow

Returns or sets the number of the row that appears at the top of the pane or window.

SelectedSheets SelectedSheets SelectedSheets

Returns a Sheets collection that represents all the selected sheets in the specified window.

Selection Selection Selection

Returns the selected object in the specified window.

SheetViews SheetViews SheetViews

Returns the SheetViews object for the specified window. Read-only.

Split Split Split

True if the window is split.

SplitColumn SplitColumn SplitColumn

Returns or sets the column number where the window is split into panes (the number of columns to the left of the split line).

SplitHorizontal SplitHorizontal SplitHorizontal

Returns or sets the location of the horizontal window split in points.

SplitRow SplitRow SplitRow

Returns or sets the row number where the window is split into panes (the number of rows above the split).

SplitVertical SplitVertical SplitVertical

Returns or sets the location of the vertical window split in points.

TabRatio TabRatio TabRatio

Returns or sets the ratio of the width of the workbook's tab area to the width of the window's horizontal scroll bar (as a number between 0 (zero) and 1; the default value is 0.6).

Top Top Top

The distance in points from the top edge of the window to the top edge of the usable area (below the menus, any toolbars docked at the top, and the formula bar).

Type Type Type

Returns or sets the window type.

UsableHeight UsableHeight UsableHeight

Returns the maximum height in points of the space that a window can occupy in the application window area.

UsableWidth UsableWidth UsableWidth

Returns the maximum width in points of the space that a window can occupy in the application window area.

View View View

Returns or sets the view showing in the window.

Visible Visible Visible

Determines whether the object is visible.

VisibleRange VisibleRange VisibleRange

Returns a Range object that represents the range of cells that are visible in the window or pane. If a column or row is partially visible, it's included in the range.

Width Width Width

The width in points of the window.

WindowNumber WindowNumber WindowNumber

Returns the window number. For example, a window named "Book1.xls:2" has 2 as its window number. Most windows have the window number 1.

WindowState WindowState WindowState

Returns or sets the state of the window.

Zoom Zoom Zoom

Returns or sets the display size of the window as a percentage (100 equals normal size, 200 equals double size, and so on).

Methods

_PrintOut(Object, Object, Object, Object, Object, Object, Object, Object) _PrintOut(Object, Object, Object, Object, Object, Object, Object, Object) _PrintOut(Object, Object, Object, Object, Object, Object, Object, Object)
Activate() Activate() Activate()

Brings the window to the front of the z-order.

ActivateNext() ActivateNext() ActivateNext()

Activates the specified window, and then sends it to the back of the window z-order.

ActivatePrevious() ActivatePrevious() ActivatePrevious()

Activates the specified window and then activates the window at the back of the window z-order.

Close(Object, Object, Object) Close(Object, Object, Object) Close(Object, Object, Object)

Closes the object.

LargeScroll(Object, Object, Object, Object) LargeScroll(Object, Object, Object, Object) LargeScroll(Object, Object, Object, Object)

Scrolls the contents of the window by pages.

NewWindow() NewWindow() NewWindow()

Creates a new window or a copy of the specified window.

PointsToScreenPixelsX(Int32) PointsToScreenPixelsX(Int32) PointsToScreenPixelsX(Int32)

Converts a horizontal measurement from points (document coordinates) to screen pixels (screen coordinates).

PointsToScreenPixelsY(Int32) PointsToScreenPixelsY(Int32) PointsToScreenPixelsY(Int32)

Converts a vertical measurement from points (document coordinates) to screen pixels (screen coordinates).

PrintOut(Object, Object, Object, Object, Object, Object, Object, Object) PrintOut(Object, Object, Object, Object, Object, Object, Object, Object) PrintOut(Object, Object, Object, Object, Object, Object, Object, Object)

Prints the object.

PrintPreview(Object) PrintPreview(Object) PrintPreview(Object)

Shows a preview of the object as it would look when printed.

RangeFromPoint(Int32, Int32) RangeFromPoint(Int32, Int32) RangeFromPoint(Int32, Int32)

Returns the Shape or Range object that is positioned at the specified pair of screen coordinates. If there isn’t a shape located at the specified coordinates, this method returns Nothing.

ScrollIntoView(Int32, Int32, Int32, Int32, Object) ScrollIntoView(Int32, Int32, Int32, Int32, Object) ScrollIntoView(Int32, Int32, Int32, Int32, Object)

Scrolls the document window so that the contents of a specified rectangular area are displayed in either the upper-left or lower-right corner of the document window or pane.

ScrollWorkbookTabs(Object, Object) ScrollWorkbookTabs(Object, Object) ScrollWorkbookTabs(Object, Object)

Scrolls through the workbook tabs at the bottom of the window.

SmallScroll(Object, Object, Object, Object) SmallScroll(Object, Object, Object, Object) SmallScroll(Object, Object, Object, Object)

Scrolls the contents of the window by rows or columns.

Applies to