QBCOLOR

QBCOLOR(color)

Returns the RGB colour corresponding to the specified colour number (Long).


colorThe number in the range between 0 and 15 (Integer):
0 = "Black"
1 = "Blue"
2 = "Green"
3 = "Cyan"
4 = "Red"
5 = "Magenta"
6 = "Yellow"
7 = "White"
8 = "Gray"
9 = "Light Blue"
10 = "Light Green"
11 = "Light Cyan"
12 = "Light Red"
13 = "Light Magenta"
14 = "Light Yellow"
15 = "Bright White"

REMARKS
* The color argument represents color values used by earlier versions of Basic (such as Microsoft Visual Basic for MS-DOS and the Basic Compiler).
* Starting with the least-significant byte, the returned value specifies the red, green, and blue values used to set the appropriate color in the RGB system used by Visual Basic for Applications.
* The equivalent .NET function is [[Microsoft.VisualBasic.Information.QbColor]]
* For the Microsoft documentation refer to learn.microsoft.com

Debug.Print QBColor(15)              '= 16777215  
Debug.Print VBA.RGB(255,255,255) '= 16777215

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top