Custom color in Excel 2007?

X

xp

I have a function that used to put several custom mixed colors on the color
palette and then I could reference the color index number to get that color:

ActiveWorkbook.Colors(52) = RGB(222, 202, 202)
ActiveWorkbook.Colors(51) = RGB(231, 171, 171)
ActiveWorkbook.Colors(49) = RGB(145, 207, 207)
ActiveWorkbook.Colors(11) = RGB(249, 198, 170)

1) However, I'm now using Office 2007. My function runs without error, but
where did my colors go?

2) I would like to have my custom colors on a custom palette, is this
possible in 2007?

3) Is Excel still limited to storing 56 colors?

Thanks for the assistance!
 
P

Peter T

xp said:
I have a function that used to put several custom mixed colors on the color
palette and then I could reference the color index number to get that
color:

ActiveWorkbook.Colors(52) = RGB(222, 202, 202)
ActiveWorkbook.Colors(51) = RGB(231, 171, 171)
ActiveWorkbook.Colors(49) = RGB(145, 207, 207)
ActiveWorkbook.Colors(11) = RGB(249, 198, 170)

1) However, I'm now using Office 2007. My function runs without error, but
where did my colors go?

The 56 colour palette is retained in 2007 for compatibility but it does not
have much practical use.
2) I would like to have my custom colors on a custom palette, is this
possible in 2007?

You could create a customized set of theme colours. You can only customize
the ten colours in the top row, each will then be given 5 TintAndShade
colours based of the customized colour. See Page Layout, Colors, Create New
Theme colors.

If you have figured out how to edit xml, you could add your "Recent Colors"
in the palatte, in \styles.xml, <mruColors>.
I don't know if there's a way to add these with pure VBA, same as manually
apply a customized colour and it gets added as a mru colour. If there is
that'd be much easier.
3) Is Excel still limited to storing 56 colors?

In theory the number of colours is unlimited.
Thanks for the assistance!


Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top