set default fill color upon open

B

brittonsm

I'm trying to find how to change the default fill color option on the
toolbar and can't seem to get there.... Now I don't want to change
the default template (XLSTART book.xlt) - Changing that just causes
the NEW blank workbooks to have my modified yellow to gray scheme.
But if someone emails me a spreadsheet the default when I open that
session is still yellow.

So what I'm asking is there a way via code in the workbook on open of
the personal.xls file to set the default color in the fill option to
be the 25% grey color index 15???

-Steve
 
F

F.H. van Zelm

Hi Steve,

For a start: I'm interested in the reason of your question. Why would
you want this?
It looks like an 'impossible question' because there are no answers
up to now. I'll give it a try. Any readers ... please comment if it is a
silly approach.

The bad part of my answer:
The color palette is stored by workbook. You found this yourself:
changing Book.xlt doesn't change the palette of existing workbooks.
So changing the palette in Personal.xls won't work either. And the
Workbook_Open event only deals with Personal.xls itself.

To good (and difficult) part:
In your Personal.xls, you could create a class module to program
the 'global' Excel Workbook_Open event. There, you can change the
yellow default into grey for each and every workbook that is opened.
And ... set grey to yellow, I think.
(I don't know if it would be possible to change Excels 'habit' to pick
grey i.s.o. yellow.)
The command line would be
ActiveWorkbook.Colors(6) = RGB(192, 192, 192)
but you'll have to exclude Personal.xls itself from this action (because
it is a hidden workbook?).

Search the web on how to create the class module to interfere with
the Excel events. There are nice samples.

Last remark: I think PowerPoint remembers the last used fill color
by presentation. Excel doesn't.

Frans
 
B

brittonsm

Thanks for the reply, I fiddled around a little and lost interest in
this - The reason why, cuz someone asked me if it was possible - So
that started the wheels turning on coming up with a method to do so -
I decided that a class module was just to much work, so I told them to
deal with it... ;)

Thanks for the input.
 

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