ForeColor Property

Microsoft Excel Visual Basic

Returns a ChartColorFormat object that represents the specified foreground fill or solid color. Read-only ChartColorFormat object.

expression.ForeColor

expression    Required. An expression that returns one of the above objects.

ShowForeColor property as it applies to the FillFormat, LineFormat, and ShadowFormat objects.

Returns a ColorFormat object that represents the specified foreground fill or solid color. Read/write ColorFormat object.

expression.ForeColor

expression    Required. An expression that returns one of the above objects.

Example

This example sets the foreground color, background color, and gradient for the chart area fill on chart one.

With Charts(1).ChartArea.Fill
    .Visible = True
    .ForeColor.SchemeColor = 15
    .BackColor.SchemeColor = 17
    .TwoColorGradient msoGradientHorizontal, 1
End With