BorderColor property

Specifies the color of an object's border.

Syntax

object.BorderColor [= Long ]

The BorderColor property syntax has these parts:

Part Description
object Required. A valid object.
Long Optional. A value or constant that determines the border color of an object.

Settings

You can use any integer that represents a valid color. You can also specify a color by using the RGB function with red, green, and blue color components. The value of each color component is an integer that ranges from zero to 255. For example, you can specify teal blue as the integer value 4966415 or as RGB color component values 15, 200, 75.

Remarks

To use the BorderColor property, the BorderStyle property must be set to a value other than fmBorderStyleNone.

BorderStyle uses BorderColor to define the border colors. The SpecialEffect property uses system colors exclusively to define its border colors. For Windows operating systems, system color settings are part of the Control Panel and are found in the Appearance tab of the Display folder. In Windows NT 4.0 or later, system color settings are stored in the Color folder of the Control Panel.

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.