Share via


ChartSheet.ChartTitle Property (2007 System)

Gets a ChartTitle that represents the title of the specified Microsoft.Office.Tools.Excel.ChartSheet.

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 ChartTitle As ChartTitle
'Usage
Dim instance As ChartSheet 
Dim value As ChartTitle 

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

Property Value

Type: ChartTitle
A ChartTitle that represents the title of the specified Microsoft.Office.Tools.Excel.ChartSheet.

Examples

The following code example uses the ChartTitle property of the current Microsoft.Office.Tools.Excel.ChartSheet to modify the font color of the title.

Private Sub SetTitleColor()
    Globals.Sheet1.Range("A1", "A5").Value2 = 22
    Globals.Sheet1.Range("B1", "B5").Value2 = 55

    Me.ChartWizard(Globals.Sheet1.Range("A1", "B5"), _
        Excel.XlChartType.xl3DColumn, PlotBy:=Excel.XlRowCol.xlColumns, _
        HasLegend:=False, Title:="Revised chart")

    Me.ChartTitle.Font.Color = _
            ColorTranslator.ToOle(Color.Green)
End Sub
private void SetTitleColor()
{
    Globals.Sheet1.Range["A1", "A5"].Value2 = 22;
    Globals.Sheet1.Range["B1", "B5"].Value2 = 55;

    this.ChartWizard(Globals.Sheet1.Range["A1", "B5"],
        Excel.XlChartType.xl3DColumn, missing,
        Excel.XlRowCol.xlColumns, missing, missing, false,
        "Revised chart", missing, missing, missing);

    this.ChartTitle.Font.Color =
        ColorTranslator.ToOle(Color.Green);
}

.NET Framework Security

See Also

Reference

ChartSheet Class

ChartSheet Members

Microsoft.Office.Tools.Excel Namespace