Udostępnij za pośrednictwem


WorkbookBase.Windows Property

Definition

Gets a Windows collection that represents all the windows in the workbook.

public:
 property Microsoft::Office::Interop::Excel::Windows ^ Windows { Microsoft::Office::Interop::Excel::Windows ^ get(); };
public Microsoft.Office.Interop.Excel.Windows Windows { get; }
member this.Windows : Microsoft.Office.Interop.Excel.Windows
Public ReadOnly Property Windows As Windows

Property Value

A Windows collection that represents all the windows in the workbook.

Examples

The following code example uses the Windows property to display formulas, gridlines, and the outline of the current workbook.

This example is for a document-level customization.

private void SetWindowOptions()
{
    this.Windows[1].DisplayFormulas = true;
    this.Windows[1].DisplayGridlines = true;
    this.Windows[1].DisplayOutline = true;
}
Private Sub SetWindowOptions()
    Me.Windows(1).DisplayFormulas = True
    Me.Windows(1).DisplayGridlines = True
    Me.Windows(1).DisplayOutline = True
End Sub

Remarks

This property returns a collection of both visible and hidden windows.

Applies to