RGB for cell interior
James,
The excel color palate only allows for 50ish (55?) colors, so if you
want to set a specific RGB color, you will first need to edit the
palate of your excel file.
ActiveWorkbook.Colors(colorindex) = RGB(red, green, blue)
where red, green and blue are integers between 0 and 255 and the color
index is also an integer.
Then, you can apply that color to cells via (example sets the interior
color of cell A1 to your defined color):
range("A1").Interior.Color = ActiveWorkbook.Colors(colorindex)
HTH,
Abe
Zone wrote:
I want to apply an RGB color to a cell interior using VBA. TIA, James
|