Sets the specified fill to a one-color gradient.

expression.OneColorGradient(Style, Variant, Degree)expressionRequired. An expression that returns one of the objects in the Applies To list.Style Required . The gradient style for the specified fill.

MsoGradientStyle can be one of these MsoGradientStyle constants.
msoGradientDiagonalDown
msoGradientDiagonalUp
msoGradientFromCenter
msoGradientFromCorner
msoGradientFromTitle
msoGradientHorizontal
msoGradientMixed
msoGradientVertical
Variant Required Long. The gradient variant for the specified fill. Can be a value from 1 through 4, corresponding to the four variants listed on the Gradienttab in the Fill Effectsdialog box. If Styleis msoGradientFromCenter, the Variantargument can only be 1 or 2.Degree Required Single. The gradient degree for the specified fill. Can be a value from 0.0 (dark) through 1.0 (light).

Example

This example sets the chart's fill format.

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