PresetGradientType Property

Applies To

ChartFillFormat object.

Description

Returns the preset gradient type for the specified fill. Can be one of the following MsoPresetGradientType constants: msoGradientBrass, msoGradientCalmWater, msoGradientChrome, msoGradientChromeII, msoGradientDaybreak, msoGradientDesert, msoGradientEarlySunset, msoGradientFire, msoGradientFog, msoGradientGold, msoGradientGoldII, msoGradientHorizon, msoGradientLateSunset, msoGradientMahogany, msoGradientMoss, msoGradientNightfall, msoGradientOcean, msoGradientParchment, msoGradientPeacock, msoGradientRainbow, msoGradientRainbowII, msoGradientSapphire, msoGradientSilver, msoGradientWheat, or msoPresetGradientMixed. Read-only Long.

This property is read-only. Use the PresetGradient method to set the preset gradient type for the fill.

Example

This example changes the chart's preset gradient fill format from silver to gold.

With myChart.ChartArea.Fill
    If .Type = msoFillGradient Then
        If .GradientColorType = msoGradientPresetColors Then
            If .PresetGradientType = msoGradientSilver Then
                .PresetGradient .GradientStyle, _
                    .GradientVariant, msoGradientGold
            End If
        End If
    End If
End With