ColorIndex Property

See Also         Example         Applies To

Returns or sets the color of the border, font, or interior, as shown in the following table. The color is specified as an index value into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Variant.

Object ColorIndex
Border The color of the border.
Borders The color of all four borders. Returns Null if all four borders aren't the same color.
Font The color of the font. Specify xlColorIndexAutomatic to use the automatic color.
Interior The color of the interior fill. Set this property to xlColorIndexNone to specify that you don't want an interior fill. Set this property to xlColorIndexAutomatic to specify the automatic fill (for drawing objects).

Remarks

This property specifies a color as an index into the workbook color palette. You can use the Colors method to return the current color palette.

The following illustration shows the color-index values in the default color palette.

Color index values in default color palette