Fill Property

Applies To

AxisTitle object, ChartArea object, ChartTitle object, DataLabel object, DataLabels collection object, DownBars object, Floor object, Legend object, LegendKey object, PlotArea object, Point object, Series object, Shape object, ShapeRange collection object, UpBars object, Walls object.

Description

Returns a FillFormat object that contains fill formatting properties for the specified chart or shape. Read-only.

Example

This example adds a rectangle to myDocument and then sets the foreground color, background color, and gradient for the rectangle's fill.

Set myDocument = Worksheets(1)
With myDocument.Shapes.AddShape(msoShapeRectangle, 90, 90, 90, 50).Fill
    .ForeColor.RGB = RGB(128, 0, 0)
    .BackColor.RGB = RGB(170, 170, 170)
    .TwoColorGradient msoGradientHorizontal, 1
End With