Chart.ChartStyle property (Project)
Gets or sets the chart style for a chart. Read/write Variant.
Syntax
expression. ChartStyle
expression A variable that represents a Chart object.
Remarks
Use a number from 1 to 48 to set the chart style.
Example
To use the following CycleThroughStyles method, make a chart active, and then set a breakpoint in the For … Next loop to observe the chart styles.
Sub CycleThroughStyles()
Dim chartShape As Shape
Dim reportName As String
Dim i As Integer
reportName = "Simple scalar chart"
Set chartShape = ActiveProject.Reports(reportName).Shapes(1)
For i = 1 To 48
chartShape.Chart.ChartStyle = i
Next i
End Sub
Property value
VARIANT
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.