Font.ColorIndex property (Excel)

Returns or sets a Variant value that represents the color of the font.

Syntax

expression. ColorIndex

expression A variable that represents a Font object.

Remarks

The color is specified as an index value into the current color palette, or as one of the following xlColorIndex constants:

  • xlColorIndexAutomatic

  • xlColorIndexNone

Example

This example changes the font color in cell A1 on Sheet1 to red.

Worksheets("Sheet1").Range("A1").Font.ColorIndex = 3

See also

Font Object