Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default 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






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default 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




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Background Color for selected range Glyn[_2_] Excel Worksheet Functions 7 October 7th 08 06:11 PM
How do I change background color of highlighted Excel range ? Jim Excel Discussion (Misc queries) 0 June 6th 08 07:59 PM
tab.colorindex linked to cell color Mike Excel Worksheet Functions 2 April 12th 07 12:44 AM
Excel should let me sort on cell background color mama Setting up and Configuration of Excel 5 July 5th 06 01:40 PM
How Do I change the background color of a cell in microsoft excel. amac Excel Discussion (Misc queries) 1 February 25th 05 07:49 PM


All times are GMT +1. The time now is 03:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"