Chart.ChartType property (Project)
Gets or sets the chart type. Read/write Office.XlChartType.
expression.ChartType
expression A variable that represents a Chart object.
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.
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
XLCHARTTYPE
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.