PatternColorIndex Property

Applies To

Interior Object.

Description

Returns or sets the interior pattern color as an index into the current color palette (a value from 1 to 56, or xlNone if there is no background color). Read-write.

Remarks

Set this property to xlAutomatic to specify the automatic pattern for cells or the automatic fill style for drawing objects. Set this property to xlNone to specify no pattern (this is the same as setting Interior.Pattern to xlNone).

See Also

Color Property, Colors Property, Pattern Property, PatternColor Property.

Example

This example sets the interior pattern color for rectangle one on Sheet1.


With Worksheets("Sheet1").Rectangles(1).Interior
    .Pattern = xlChecker
    .PatternColorIndex = 5
End With