ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   need to set a cell background color which is not within the Excel colorindex range (https://www.excelbanter.com/excel-programming/284619-need-set-cell-background-color-not-within-excel-colorindex-range.html)

Oscar

need to set a cell background color which is not within the Excel colorindex range
 
Is there a way to set the background color of a cell in another way than the
interior.colorindex property ? I need to set a very light red color, and the
reds that Exel exposes within the colorindex range are too dark for this.
I've tried to change the background color outside from a VB app with
interior.color=....colornr but that results in Excel in other colors than VB
normally does when using the same color numbers.

Oscar



Bob Phillips[_6_]

need to set a cell background color which is not within the Excel colorindex range
 
Oscar,

You could use Color=RGB(... but Excel will map that onto the equivalent
ColorIndex anyway. What you can do instead is to change the colour in the
colour palette. Goto menu ToolsOptions and select the Color tab, select
the red colour, click the Modify button, select the Custom tab, and select
the shade of red you want. OK it and the Red ColorIndex takes on that
colour.

--

HTH

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

"Oscar" wrote in message
.nl...
Is there a way to set the background color of a cell in another way than

the
interior.colorindex property ? I need to set a very light red color, and

the
reds that Exel exposes within the colorindex range are too dark for this.
I've tried to change the background color outside from a VB app with
interior.color=....colornr but that results in Excel in other colors than

VB
normally does when using the same color numbers.

Oscar





Oscar

need to set a cell background color which is not within the Excel colorindex range
 
Thanks Bob,
I've seen that it worked. Let's see whether the whole subject can be
automated by VB/VBA.

Oscar

"Bob Phillips" schreef in bericht
...
Oscar,

You could use Color=RGB(... but Excel will map that onto the equivalent
ColorIndex anyway. What you can do instead is to change the colour in the
colour palette. Goto menu ToolsOptions and select the Color tab, select
the red colour, click the Modify button, select the Custom tab, and select
the shade of red you want. OK it and the Red ColorIndex takes on that
colour.

--

HTH

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

"Oscar" wrote in message
.nl...
Is there a way to set the background color of a cell in another way than

the
interior.colorindex property ? I need to set a very light red color, and

the
reds that Exel exposes within the colorindex range are too dark for

this.
I've tried to change the background color outside from a VB app with
interior.color=....colornr but that results in Excel in other colors

than
VB
normally does when using the same color numbers.

Oscar







Bob Phillips[_6_]

need to set a cell background color which is not within the Excel colorindex range
 
ActiveWorkbook.Colors(3) = RGB(242, 20, 20)

If you know the RGB values (I have to do it by trial and error), you are
away<vbg

--

HTH

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

"Oscar" wrote in message
.nl...
Thanks Bob,
I've seen that it worked. Let's see whether the whole subject can be
automated by VB/VBA.

Oscar

"Bob Phillips" schreef in bericht
...
Oscar,

You could use Color=RGB(... but Excel will map that onto the equivalent
ColorIndex anyway. What you can do instead is to change the colour in

the
colour palette. Goto menu ToolsOptions and select the Color tab,

select
the red colour, click the Modify button, select the Custom tab, and

select
the shade of red you want. OK it and the Red ColorIndex takes on that
colour.

--

HTH

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

"Oscar" wrote in message
.nl...
Is there a way to set the background color of a cell in another way

than
the
interior.colorindex property ? I need to set a very light red color,

and
the
reds that Exel exposes within the colorindex range are too dark for

this.
I've tried to change the background color outside from a VB app with
interior.color=....colornr but that results in Excel in other colors

than
VB
normally does when using the same color numbers.

Oscar









Gord Dibben

need to set a cell background color which is not within the Excel colorindex range
 
Bob

Great little utility here....

http://no-nonsense-software.com/freeware/

RGBtoHEX 1.1a

Gord Dibben XL2002

On Sat, 6 Dec 2003 00:12:48 -0000, "Bob Phillips"
wrote:

If you know the RGB values (I have to do it by trial and error), you are
away<vbg



Oscar

need to set a cell background color which is not within the Excel colorindex range
 
thank you Bob and Gord,

I've found the right RGB-value and successfully added it by coding.

Oscar

"Gord Dibben" <gorddibbATshawDOTca schreef in bericht
...
Bob

Great little utility here....

http://no-nonsense-software.com/freeware/

RGBtoHEX 1.1a

Gord Dibben XL2002

On Sat, 6 Dec 2003 00:12:48 -0000, "Bob Phillips"
wrote:

If you know the RGB values (I have to do it by trial and error), you are
away<vbg





Bob Phillips[_6_]

need to set a cell background color which is not within the Excel colorindex range
 
Thanks Gord, I might just build my own Excel version <g

Bob

"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Bob

Great little utility here....

http://no-nonsense-software.com/freeware/

RGBtoHEX 1.1a

Gord Dibben XL2002

On Sat, 6 Dec 2003 00:12:48 -0000, "Bob Phillips"
wrote:

If you know the RGB values (I have to do it by trial and error), you are
away<vbg






All times are GMT +1. The time now is 12:20 PM.

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