View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Changing color in palette

Hi Gilbert,

You have enough good replies but a bit more background:
If you are working with old (xl95) & new workbooks you've probably noticed
the default palettes are different. 19 differences, one of these is
colorindex 38 which is 13409484 and 13408767 respectively. Or
RGB(204,156,204) and RGB(255,153,204).

If it's acceptable for your old workbooks to adopt the new palette, you
could reset the palette of each with the new "default" colours. This will
change the appearance of some colours in your old wb's but at least from now
on copy/paste between wb's will result in consistent colours.

You can do this manually, Tools Options Colors or a simple macro to
reset all open wb's

Sub UpdatePalettes()
Dim wb As Workbook
For Each wb In Application.Workbooks
wb.ResetColors
Next
End Sub

However, occasionally it can be impossible to reset an old palette to that
of the new.



Regards,
Peter

"Gilbert De Ceulaer" wrote in message
...
I have several workbooks all linked together.
Some of them are old, some of them are newer (Maybe, I even started them

in
a different version of Excel)
When I choose a background color for a cell the color that shows in a
certain position on the palette is not the same in all the workbooks. I
checked it with a macro :

Sub Kleurtest()
'
' Kleurtest Macro
' Macro recorded 12/12/2004 by GDC
'
' Keyboard Shortcut: Ctrl+Shift+D
'
With Selection.Interior
.ColorIndex = 38
.Pattern = xlSolid
End With
End Sub

In one workbook it give me a reddish pink, an another this gives me an
darker pink.

Is the any way of changing the one of the colors in the palette, so I can
have the same color attached to this ".colorindex = 38" ?

Gilbert De Ceulaer