Compartir a través de


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

Concepts

Font Object Members

Font Object