ForeColor Property

The ForeColor property returns or sets the foreground color as an RGB value. Returns a Long.

Syntax

object.ForeColor

object.ForeColor = Color

 

Parameter Type Description
Color grfColor required, see the Remarks below

 

Remarks

Use the enumeration [grfColorRed], RGB value [RGB(255,0,0)], or number [255] to set a color. When using ForeColor with fill, a pattern must be selected for the color to show.

Example 1

This example demonstrates how to return the foreground color of a fill.

Debug.Print FillFormat

Example 2

This example demonstrates how to set the foreground color of a fill to red.

FillFormat.ForeColor= grfColorRed

 

Used by: AutoFill object, AutoLine object