ChartColorFormat object (Excel Graph)
Represents a foreground or background color.
Remarks
Use the ForeColor property to return a ChartColorFormat object that represents the foreground fill color.
Use the BackColor property to return the background fill color.
Use the RGB property to return the color as an explicit red-green-blue value.
Use the SchemeColor property to return or set the color as one of the colors in the current color scheme.
Example
The following example sets the foreground color, background color, and gradient for the chart area fill in myChart.
With myChart.ChartArea.Fill
.Visible = True
.ForeColor.SchemeColor = 15
.BackColor.SchemeColor = 17
.TwoColorGradient msoGradientHorizontal, 1
End With
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.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for