Color Property

Applies To

Border Object, Borders Collection, Font Object, Interior Object.

Description

Returns or sets the primary color of the object, as shown in the following table. The color is a long integer, created with the RGB function. Read-write.

Object

Color

Border

The color of the border.

Borders

The color of all four borders of a range. If they are not the same, returns Null.

Font

The color of the font.

Interior

The cell shading color or drawing object fill color.


Remarks

If the color is Automatic, the Color property returns the automatic color as an RGB value (a long integer). Use the ColorIndex property to determine if the color is Automatic.

Example

This example sets the color of the tick labels on the value axis in Chart1.


Charts("Chart1").Axes(xlValue).TickLabels.Font.Color = RGB(0, 255, 0)