Article ID: 170781
Article Last Modified on 8/17/2005
APPLIES TO
- Microsoft Excel 97 Standard Edition
- Microsoft Excel 95 Standard Edition
- Microsoft Excel 5.0 Standard Edition
This article was previously published under Q170781
SUMMARY
When you use the RGB function in a Visual Basic for Applications macro, the
color value of the RGB color of the index may be mapped to a color other
than the color you expected.
For example, RGB(65,0,0) is mapped to Dark Red, but RGB(64,0,0) is mapped
to Black.
The color property accepts an RGB triple and maps it to the nearest color
index. When the property retrieves the color value, it returns the RGB
color of the index, which may be different from the value you typed. In the
example, RGB(65,0,0) is mapped to Dark Red (RGB(128,0,0)), but RGB(64,0,0)
is mapped to Black (RGB(0,0,0)).
REFERENCES
For more information about the ShapeRange Object collection, click the
Index tab in Microsoft Visual Basic Help, type the following text
and then double-click the selected text to go to the "ShapeRange Object
Collection" topic. If you are unable to find the information you need, ask
the Office Assistant.
Additional query words: XL97 XL
Keywords: kbprogramming kbprb kbdtacode KB170781