View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default RGB for cell interior

Since XL can only display the 56 colors in the color palette, using

Cells(1, 1).Interior.Color = RGB(63, 127, 255)

will choose the "closest" color in the palette.

You can change one of the colors in the palette to include your color:

ActiveWorkbook.Colors(37) = RGB(63, 127, 255)

You can then assign the color using the ColorIndex property:

Cells(1, 1).Interior.ColorIndex = 37



In article .com,
"Zone" wrote:

I want to apply an RGB color to a cell interior using VBA. TIA, James