Selection.Interior.ColorIndex = ???

  • Thread starter Thread starter Ben W
  • Start date Start date
B

Ben W

Is it possible to use an RGB value in this statement?

ie. The lightest grey I can select in the dropdown when editing the excel
has a value of 15. I would like to choose a *very* light grey...??

I would like to use something like Selection.Interior.ColorIndex =
rgb(xx,yy,zz) - but this doesn't work..

Thanks
BW
 
BW,

No you cannot use RGB with Colorindex, its name reflects that it is an
index.

You can use

Selection.Interior.Color = RGB(...

but you should be aware that when you do this to a spreadsheet, Excel will
map that chosen colour to the nearest ColorIndex colour, and use that colour
instead.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Thanks, so it's not possible to choose a Fill colour other than the 40 odd
that are in the dropdown?
 
No, but you can redefine the colours to include a custom colour. This
previous post of mine describes how

http://tinyurl.com/2fbh3

Make sure you also read Dave Peterson's follow-up as well.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top