VBA-Defined Constants: vbGreen : Color Constant « Application « VBA / Excel / Access / Word






VBA-Defined Constants: vbGreen

 
Sub obj5()
    Dim myObject As Range
    Set myObject = Range("A1:B10")
    myObject.Interior.Color = vbGreen
End Sub

 








Related examples in the same category

1.To use standard colors: vbBlack, vbRed, vbGreen, vbYellow, vbBlue, vbMagenta, vbCyan, or vbWhite
2.VBA-Defined Constants: vbBlack
3.VBA-Defined Constants: vbBlue
4.VBA-Defined Constants: vbCyan
5.VBA-Defined Constants: vbMagenta
6.VBA-Defined Constants: vbRed
7.VBA-Defined Constants: vbWhite
8.VBA-Defined Constants: vbYellow