Workbook.Windows Property (2007 System)

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

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property Windows As Windows
'Usage
Dim instance As Workbook 
Dim value As Windows 

value = instance.Windows
[BrowsableAttribute(false)]
public Windows Windows { get; }
[BrowsableAttribute(false)]
public:
property Windows^ Windows {
    Windows^ get ();
}
public function get Windows () : Windows

Property Value

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

Remarks

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

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 Sub SetWindowOptions()
    Me.Windows(1).DisplayFormulas = True 
    Me.Windows(1).DisplayGridlines = True 
    Me.Windows(1).DisplayOutline = True 
End Sub
private void SetWindowOptions()
{
    this.Windows[1].DisplayFormulas = true;
    this.Windows[1].DisplayGridlines = true;
    this.Windows[1].DisplayOutline = true;
}

.NET Framework Security

See Also

Reference

Workbook Class

Workbook Members

Microsoft.Office.Tools.Excel Namespace