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
.