ForegroundColor

<< Click to Display Table of Contents >>

 

ForegroundColor

Color This property specifies a fill color for an object's foreground. This color is used when the FillStyle property is set to 0 (zero, solid) or between 2 (two) and 9 (nine). In scripts, use VBScript's RGB method to create a color to link to this property. Default value of this property is blue (RGB(0, 0, 255)). Example:

Sub Button1_Click()
  ' Changes button's background color
  ' to green when clicking it
  ForegroundColor = RGB(0, 255, 0)
End Sub

Was this page useful?