BorderColor Property

Applies To

ComboBox control, Frame control, Image control, Label control, ListBox control, TextBox control, UserForm object.

Description

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 3.51, system color settings are stored in the Color folder of the Control Panel.

See Also

BorderStyle property.

Example

See the BackColor property example.