![]() |
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 |
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 . |
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 . |
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 |
All times are GMT +1. The time now is 06:33 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com