Chart.ChartType property (Project)
Gets or sets the chart type. Read/write Office.XlChartType.
Syntax
expression.ChartType
expression A variable that represents a Chart object.
Remarks
The ChartType property corresponds to an action in the Change Chart Type dialog box. The command is on the ribbon under CHART TOOLS, on the DESIGN tab.
Example
The following example changes a clustered column chart to a clustered 3D column chart type.
Sub SwitchChartTo3D()
Dim chartShape As Shape
Set chartShape = ActiveProject.Reports("Simple scalar chart").Shapes(1)
With chartShape.Chart
Debug.Print .ChartType
If .ChartType = xlColumnClustered Then
.ChartType = xl3DColumnClustered
End If
End With
End Sub
Property value
XLCHARTTYPE
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.