GradientColorType property (Excel Graph)

Returns the gradient color type for the specified fill. Read-only MsoGradientColorType.

Syntax

expression.GradientColorType

expression Required. An expression that returns one of the objects in the Applies To list.

Example

This example sets the fill format for the chart if its chart area has a one-color gradient fill.

With myChart.ChartArea.Fill 
 If .Type = msoFillGradient Then 
 If .GradientColorType = msoGradientOneColor Then 
 .OneColorGradient Style:= msoGradientFromCorner, _ 
 Variant:= 1, Degree:= 0.3 
 End If 
 End If 
End With

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.