Table of contents
Collapse the table of content
Expand the table of content

Chart.ChartColor Property (Project)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Gets or sets the index of chart colors for the active chart. Read/write Variant.


expression. ChartColor

expression A variable that represents a Chart object.


The ChartColor property corresponds to a selection in the Change Colors drop-down list, which is on the ribbon under Chart Tools, on the Format tab, in the ChartStyles group.

Note The Colors drop-down list on the ribbon under REPORT TOOLS, on the DESIGN tab, in the Themes group, changes the color theme of the entire report, including any charts on the report. The VBA object model in Project does not support the control for report theme colors.


In the following example, the chart is the first shape in the "Simple scalar chart" report. The example sets the chart color scheme to monochromatic greens.

Sub SetChartColor()
    Dim chartShape As Shape

    Set chartShape = ActiveProject.Reports("Simple scalar chart").Shapes(1)

    ' ChartColor values 10 - 26 correspond to the Change Colors menu
    ' on the DESIGN tab of the CHART TOOLS ribbon.
    chartShape.Chart.ChartColor = 26
End Sub

Property value


See also

Other resources

Chart Object

© 2018 Microsoft