Color Palette For Excel 2007

jstevens
GoldLounger
Posts: 2631
Joined: 26 Jan 2010, 16:31
Location: Southern California

Color Palette For Excel 2007

Post by jstevens »

Is it possible to reset the color palette in Excel 2007? The color scheme from Excel 2003 workbooks are not displaying the true colors.

Example:
ActiveCell.offset(0,0).Interior.ColorIndex = 3

Should be returning red. It is a different color in Excel 2007. I believe the color palette needs to be reset within the workbook.

Thanks,
John
Regards,
John

User avatar
Jezza
5StarLounger
Posts: 847
Joined: 24 Jan 2010, 06:35
Location: A Magic Forest in Deepest, Darkest, Kent

Re: Color Palette For Excel 2007

Post by Jezza »

As you have discovered the color indexing is different however you can use the following function to change the values

Code: Select all

Sub changepalette
    dim colorIndex as long
    colorIndex = 3
    ActiveWorkbook.Colors(colorIndex) = RGB(255, 0, 0)
End sub
You can adapt the code to suit your needs but the refence of the colours versus the code value is attached below
You do not have the required permissions to view the files attached to this post.
Last edited by Jezza on 30 Sep 2010, 15:07, edited 1 time in total.
Jerry
I’ll be more enthusiastic about encouraging thinking outside the box when there’s evidence of any thinking going on inside it

User avatar
Sundog
5StarLounger
Posts: 704
Joined: 28 Jan 2010, 22:47
Location: Alien Country (Roswell NM)

Re: Color Palette For Excel 2007

Post by Sundog »

jstevens wrote:Example:
ActiveCell.offset(0,0).Interior.ColorIndex = 3

Should be returning red. It is a different color in Excel 2007.
John, on my Excel 2007 SP2, it sure looks Red to me:
red.JPG
You do not have the required permissions to view the files attached to this post.
Sundog

jstevens
GoldLounger
Posts: 2631
Joined: 26 Jan 2010, 16:31
Location: Southern California

Re: Color Palette For Excel 2007

Post by jstevens »

Sundog,

I believe the color palette is unique to each workbook. In a new workbook a colorindex = 3 is indeed red. It would appear that the color palette needs to be reset to the default.

Regards,
John
Regards,
John

jstevens
GoldLounger
Posts: 2631
Joined: 26 Jan 2010, 16:31
Location: Southern California

Re: Color Palette For Excel 2007

Post by jstevens »

Jerry,

I got it to work with your suggestion.

Thank you,
John
Regards,
John

User avatar
Sundog
5StarLounger
Posts: 704
Joined: 28 Jan 2010, 22:47
Location: Alien Country (Roswell NM)

Re: Color Palette For Excel 2007

Post by Sundog »

jstevens wrote:It would appear that the color palette needs to be reset to the default.
How does the color palette get changed in the first place (and/or reset to the default)?
Sundog

User avatar
sdckapr
3StarLounger
Posts: 392
Joined: 25 Jan 2010, 12:21

Re: Color Palette For Excel 2007

Post by sdckapr »

Jerry,

I think the bottom left 38 should be 39. Your chart has 2 indices with a value of 38...

Steve

User avatar
Jezza
5StarLounger
Posts: 847
Joined: 24 Jan 2010, 06:35
Location: A Magic Forest in Deepest, Darkest, Kent

Re: Color Palette For Excel 2007

Post by Jezza »

sdckapr wrote:Jerry,

I think the bottom left 38 should be 39. Your chart has 2 indices with a value of 38...

Steve
Thanks Steve
All changed
Jerry
I’ll be more enthusiastic about encouraging thinking outside the box when there’s evidence of any thinking going on inside it