Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Color Codes: Different color with same color Index

Can Anyone shine a light on this:

I have a worksheet and did this:
activecell.Interior.ColorIndex =40
The cell became salmon orange as I would expect it.

I received another version of the same spreadsheet saved by a colleague.
All the cells that are salmon-orange in my sheet turn out to be grey in his
sheet.
When I select a grey cell and run:
?activecell.Interior.ColorIndex
again 40 is returned.
Even if I once more run
activecell.Interior.ColorIndex =40
the cell stays grey.

So, I have two sheets, both with cells that have an interior.colorindex of 40
but they show different colors.

Additional:
When I go to the Fill Color or Font Color icon in my colleagues sheet and hit
the arrow I get a palette that again differs from the palette I get in my own
sheet.

Is there some parameter that controls the general look of the palette and the
connected behavior of the color index coding?

Thanks!

Michiel

--
Message posted via http://www.officekb.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 489
Default Color Codes: Different color with same color Index

The .ColorIndex property refers to colors "indexed" in the Color Palette.
That explains why Activecell.Interior.ColorIndex = 40, gives you two
different colors, because you have two different Color Palette's.

I would try:

' salmon color
ActvieCell.Interior.Color = 10079487

The .Color property uses the RGB function which is universal. Read the Help
Section on ColorIndex and Color. Hope this helps! If so, let me know, click
"YES" below.

--
Cheers,
Ryan


"Michiel via OfficeKB.com" wrote:

Can Anyone shine a light on this:

I have a worksheet and did this:
activecell.Interior.ColorIndex =40
The cell became salmon orange as I would expect it.

I received another version of the same spreadsheet saved by a colleague.
All the cells that are salmon-orange in my sheet turn out to be grey in his
sheet.
When I select a grey cell and run:
?activecell.Interior.ColorIndex
again 40 is returned.
Even if I once more run
activecell.Interior.ColorIndex =40
the cell stays grey.

So, I have two sheets, both with cells that have an interior.colorindex of 40
but they show different colors.

Additional:
When I go to the Fill Color or Font Color icon in my colleagues sheet and hit
the arrow I get a palette that again differs from the palette I get in my own
sheet.

Is there some parameter that controls the general look of the palette and the
connected behavior of the color index coding?

Thanks!

Michiel

--
Message posted via http://www.officekb.com

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 489
Default Color Codes: Different color with same color Index

Forgot about the other question. Take a look at this link from Microsoft on
changing the Color Palette.

http://office.microsoft.com/en-us/ex...989351033.aspx
--
Cheers,
Ryan


"Michiel via OfficeKB.com" wrote:

Can Anyone shine a light on this:

I have a worksheet and did this:
activecell.Interior.ColorIndex =40
The cell became salmon orange as I would expect it.

I received another version of the same spreadsheet saved by a colleague.
All the cells that are salmon-orange in my sheet turn out to be grey in his
sheet.
When I select a grey cell and run:
?activecell.Interior.ColorIndex
again 40 is returned.
Even if I once more run
activecell.Interior.ColorIndex =40
the cell stays grey.

So, I have two sheets, both with cells that have an interior.colorindex of 40
but they show different colors.

Additional:
When I go to the Fill Color or Font Color icon in my colleagues sheet and hit
the arrow I get a palette that again differs from the palette I get in my own
sheet.

Is there some parameter that controls the general look of the palette and the
connected behavior of the color index coding?

Thanks!

Michiel

--
Message posted via http://www.officekb.com

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Color Codes: Different color with same color Index

Hi Ryan H.,

GREAT! Your information was very helpful!

Unfortunately the suggestion to use:
ActiveCell.Interior.Color = 10079487
did not work either. (It resulted in a yellow cell.)

But on reading your link I solved the issue by applying:
ActiveWorkbook.ResetColors
first.

Thanks!

M.


Ryan H wrote:
Forgot about the other question. Take a look at this link from Microsoft on
changing the Color Palette.

http://office.microsoft.com/en-us/ex...989351033.aspx
Can Anyone shine a light on this:

[quoted text clipped - 26 lines]

Michiel


--
Message posted via http://www.officekb.com

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
Shape color index does not match cell color index Chrisso Excel Programming 4 April 27th 09 11:47 AM
Custom Color/Color Index FARAZ QURESHI Excel Discussion (Misc queries) 4 February 29th 08 05:19 PM
Chart axes color index vs font color index [email protected] Charts and Charting in Excel 4 December 7th 06 04:05 PM
fr default color index, need color # Janis Excel Programming 3 August 23rd 06 02:31 PM
Setting Background Color RGB (Always goes to closest index color) [email protected] Excel Programming 6 December 2nd 05 11:47 PM


All times are GMT +1. The time now is 08:31 AM.

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"