title | ms.service | ms.assetid | ms.date | ms.localizationpriority |
---|---|---|---|---|
Chart.ChartTitle property (Project) |
project-server |
eb2e9c18-1dcc-3d66-e73c-b5d0dfa88472 |
06/08/2017 |
medium |
Gets an Office.IMsoChartTitle object that represents the title of the specified chart. Read-only IMsoChartTitle.
expression. ChartTitle
expression A variable that represents a Chart object.
To manually edit the text of a chart title, click in the title area. To change the title format, select the chart, and then, on the ribbon under CHART TOOLS, choose the FORMAT tab.
The following example changes the chart title and sets the title above the chart.
Sub ChangeChartTitle()
Dim chartShape As Shape
Set chartShape = ActiveProject.Reports("Simple scalar chart").Shapes(1)
With chartShape.Chart
If Not .HasTitle Then
.HasTitle = True
End If
.ChartTitle.Text = "New chart title"
.SetElement (msoElementChartTitleAboveChart)
End With
End Sub
IMSOCHARTTITLE
[!includeSupport and feedback]