expression.OneColorGradient(Style, Variant, Degree)
expression Required. An expression that returns one of the objects in the Applies To list.
Style Required MsoGradientStyle. 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 Gradient tab in the Fill Effects dialog box. If Style is msoGradientFromCenter, the Variant argument 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