Name
chartfillformat.PresetGradient(Style, Variant, PresetGradientType)
Synopsis
Applies a built-in gradient.
|
Argument |
Settings |
|---|---|
|
|
An |
|
|
The index of the gradient variant to use. The variants are listed on the Gradient tab in the Fill Effects dialog box. |
|
|
An |
The following code applies a built-in gradient to the chart area:
Sub BuiltInGradient( )
Dim chrt As Chart, cf As ChartFillFormat
' Get the chart.
Set chrt = ActiveChart
' Get the chart area fill.
Set cf = chrt.ChartArea.Fill
' Make the fill visible.
cf.Visible = True
' Display a built-in gradient.
cf.PresetGradient msoGradientDiagonalUp, 1, msoGradientBrass
End SubBecome an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access