MS Office Forum / Excel / New Users / April 2006
colors changing magically
|
|
Thread rating:  |
samearle - 29 Mar 2006 22:30 GMT I've worksheets where I've made custom colors.
Sometimes, when I email them, open them on different computers, or even just open them on my computer after working with other .xls files, the custom color has reverted to it's origional color or something completely new.
I'm wondering how I make a custom color stay what I made it be under:
tools -> option -> color -> (select color) -> modify -> custom -> RGB
and not have it change to something new or the origional standard color.
Thanks,
Sam
Bernie Deitrick - 30 Mar 2006 14:43 GMT Sam,
You could use code in the workbook open event to set the workbook's colors:
ThisWorkbook.Colors(1) = RGB(red,green,blue) ThisWorkbook.Colors(2) = RGB(red,green,blue) ... ThisWorkbook.Colors(55) = RGB(red,green,blue) ThisWorkbook.Colors(56) = RGB(red,green,blue)
Excel is limited to whatever 56 colors are in the pallet, but those colors can be any RGB colors.
HTH, Bernie MS Excel MVP
> I've worksheets where I've made custom colors. > [quoted text clipped - 13 lines] > > Sam samearle - 30 Mar 2006 20:39 GMT Thanks Bernie, Thats an idea.
Do you know if I could change that for all templates company wide? Ergo, when someone opens a doc company wide, the colors are set?
Thanks,
S.
samearle - 24 Apr 2006 19:16 GMT How do I add the below???
I opened a new excel doc, went to tools - visuall basic editor. Then added the following to module1:
ThisWorkbook.Colors(1) = RGB(100, 200, 200) ThisWorkbook.Colors(2) = RGB(100, 200, 200) ThisWorkbook.Colors(55) = RGB(100, 200, 200) ThisWorkbook.Colors(56) = RGB(100, 200, 200)
basically, what I am trying to do is change collors to custom colors every time the document opens.
Thanks,
Sam
Dave Peterson - 24 Apr 2006 21:20 GMT You could create a subroutine in a General module named Auto_Open and it would run each time excel opens that workbook:
Option Explicit Sub Auto_Open() ThisWorkbook.Colors(1) = RGB(100, 200, 200) ThisWorkbook.Colors(2) = RGB(100, 200, 200) ThisWorkbook.Colors(55) = RGB(100, 200, 200) ThisWorkbook.Colors(56) = RGB(100, 200, 200) end sub
But unless someone/something is changing the colors, you should only have to run this kind of code once.
> How do I add the below??? > [quoted text clipped - 12 lines] > > Sam
 Signature Dave Peterson
samearle - 24 Apr 2006 21:29 GMT Problem is, colors change when the document gets sent to a new computer. Esspecially when it gets sent to london from the US.
Any thoughts?
Thanks for the help.
S.
Dave Peterson - 24 Apr 2006 21:58 GMT Colors should travel to with the workbook. There's something else happening.
But since you have another response at your other thread, I bet you're happy.
> Problem is, colors change when the document gets sent to a new > computer. Esspecially when it gets sent to london from the US. [quoted text clipped - 4 lines] > > S.
 Signature Dave Peterson
samearle - 24 Apr 2006 22:10 GMT We'll, I am happy there is a new post to my thread, thanks Dave. Only wish you'd said something helpful! LOL!
Colors should travel too, yes, but they do not. I've done a few tests to recreate:
To london from us, when they send back to us, the colors are changed all the time. I atributed this to the UK program beinig a bit diferent? Also, when I open a doc and change colors, then open the old doc with the custom colors, they change.
Many diferent custom colors change, when doc gets reopened here and abroad.
That is why I wanted to add this VBA - so whenever, wherever the document gets opened. The colors get changed to what I want them to be.
Thanks,
Sam
PS - It'd be nice to be able to name the colors in the palette too!
Dave Peterson - 24 Apr 2006 23:57 GMT I've never seen the colors change--except when I or something else actually changes them. It surprises me that you're experiencing something else.
> We'll, I am happy there is a new post to my thread, thanks Dave. Only > wish you'd said something helpful! LOL! [quoted text clipped - 18 lines] > > PS - It'd be nice to be able to name the colors in the palette too!
 Signature Dave Peterson
|
|
|