Share via


Workbook.Charts Property (2007 System)

Gets a Sheets collection that represents all the chart sheets 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 Charts As Sheets
'Usage
Dim instance As Workbook 
Dim value As Sheets 

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

Property Value

Type: Sheets
A Sheets collection that represents all the chart sheets in the workbook.

Examples

The following code example uses the Charts property to generate a print preview of all the chart sheets in the current workbook.

This example is for a document-level customization.

Private Sub PreviewCharts()
    If Me.Charts.Count > 0 Then 
        Me.Charts.PrintPreview(False)
    End If 
End Sub
private void PreviewCharts()
{
    if (this.Charts.Count > 0)
    {
        this.Charts.PrintPreview(false);
    }
}

.NET Framework Security

See Also

Reference

Workbook Class

Workbook Members

Microsoft.Office.Tools.Excel Namespace