RGB Function
Syntax
RGB(red, green, blue)
Group
Description
Returns a color. The following color constants are predefined:
- vbBlack - Same as RGB(0,0,0).
- vbRed - Same as RGB(255,0,0).
- vbGreen - Same as RGB(0,255,0).
- vbYellow - Same as RGB(255,255,0).
- vbBlue - Same as RGB(0,0,255).
- vbMagenta - Same as RGB(255,0,255).
- vbCyan - Same as RGB(0,255,255).
- vbWhite - Same as RGB(255,255,255).
Example
Sub Main Debug.Print Hex(RGB(255,0,0)) '"FF0000" End Sub
See also