Name

chartfillformat.PresetTextured(PresetTexture)

Synopsis

Applies a built-in texture.

Argument

Settings

PresetTexture

An msoPresetTexture constant indicating the built-in texture to use. See the PresetTexture property for a list of settings.

The following code applies the white marble texture to a chart area:

Sub ApplyTexture( )
    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 texture.
    cf.PresetTextured msoTextureWhiteMarble
End Sub

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.