Article ID: 190187
Article Last Modified on 6/17/2005
APPLIES TO
- Microsoft Excel 98 for Macintosh
This article was previously published under Q190187
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 Collection Object, from the
Visual Basic Editor, click the Office Assistant, type
ShapeRange, click
Search, and then click to view "ShapeRange Collection Object."
NOTE: If the Assistant is hidden, click the Office Assistant button on the
Standard toolbar. If the Assistant is not able to answer your query,
please see the following article in the Microsoft Knowledge Base:
176476 OFF: Office Assistant Not Answering Visual Basic Questions
Additional query words: XL98
Keywords: kbhowto kbdtacode KB190187