ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Reading RGB background color from cell (https://www.excelbanter.com/excel-programming/336553-reading-rgb-background-color-cell.html)

Don Wiss

Reading RGB background color from cell
 
From a macro, how do I read and set the background color of a cell? I am
not interested in its color index, but the RGB color number.

Thanks, Don <www.donwiss.com (e-mail link at home page bottom).

Tom Ogilvy

Reading RGB background color from cell
 
Use the color property where you would use colorindex

--
Regards,
Tom Ogilvy

"Don Wiss" wrote in message
...
From a macro, how do I read and set the background color of a cell? I am
not interested in its color index, but the RGB color number.

Thanks, Don <www.donwiss.com (e-mail link at home page bottom).




David McRitchie

Reading RGB background color from cell
 
Hi Don,
But you will get that color only if have that exact color in your color
palette, for anything else when you try to set the value Excel will
pick the closest it can find in your 56 color palette.
http://www.mvps.org/dmcritchie/excel/colors.htm

Which I expects brings you back to what you are trying to avoid.


"Tom Ogilvy" wrote in message ...
Use the color property where you would use colorindex

--
Regards,
Tom Ogilvy

"Don Wiss" wrote in message
...
From a macro, how do I read and set the background color of a cell? I am
not interested in its color index, but the RGB color number.

Thanks, Don <www.donwiss.com (e-mail link at home page bottom).






Don Wiss

Reading RGB background color from cell
 
On Fri, 5 Aug 2005, David McRitchie wrote:

But you will get that color only if have that exact color in your color
palette, for anything else when you try to set the value Excel will
pick the closest it can find in your 56 color palette.
http://www.mvps.org/dmcritchie/excel/colors.htm

Which I expects brings you back to what you are trying to avoid.


Yes. I was desiring a lighter color purple background. Our European parent
has this corporate identity thing. I was with a fellow programmer this
afternoon and I was telling him how I deleted the toolbar (see prior
thread), but left the menu. I happened to select the menu option that had
something to do with translate. In a flash it had changed the font on every
sheet, on the buttons, and it had changed all the colors. Which as you note
means they simply completely changed the color palette. (Fortunately it was
not the real system and I was able to close the now trashed workbook!)

Their colors tended towards pastels. Including a light purple. I never use
a purple background. Too dark for me. But I was thinking maybe the light
one would be useful.

Looking at your web page it appears that what I should be doing is to
change one of the palette colors. It's getting late tonight. I'll try to
study it later this weekend.

Thanks! Don <www.donwiss.com (e-mail link at home page bottom).


All times are GMT +1. The time now is 01:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com