Sets the specified fill to a two-color gradient.

expression.TwoColorGradient(Style, Variant)expressionRequired. An expression that returns one of the objects in the Applies To list.Style Required . Specifies the gradient style.

MsoGradientStyle can be one of these MsoGradientStyle constants.
msoGradientDiagonalDown
msoGradientDiagonalUp
msoGradientFromCenter
msoGradientFromCorner
msoGradientFromTitle
msoGradientHorizontal
msoGradientMixed
msoGradientVertical
Variant Required Long. Specifies the gradient variant. Can be a value from 1 through 4, corresponding to the four variants on the Gradienttab in the Fill Effectsdialog box. If Styleis msoGradientFromCenter, the Variantargument can only be either 1 or 2.

Example

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

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