Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing color in palette
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing color in palette
Gilbert,
This changes it to the pink I have on my system ActiveWorkbook.Colors(38) = 13408767 -- HTH RP (remove nothere from the email address if mailing direct) "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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing color in palette
Thanks !
13408767 is the "reddish" pink but with your information, I was able to look up the value for the darker pink, that is 13409484, and I managed to change it ! BTW, where do you get the values, and how do you make new ones ? Gilbert "Bob Phillips" wrote in message ... Gilbert, This changes it to the pink I have on my system ActiveWorkbook.Colors(38) = 13408767 -- HTH RP (remove nothere from the email address if mailing direct) "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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing color in palette
You have another reply at your other post in .setup.
Gilbert De Ceulaer wrote: 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 -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing color in palette
Gilbert,
I got that value by setting a cell to the colour, and then doing ?Activecell.Color in the immediate window. You can also set it to RGB colours like ActiveWorkbook.Colors(38) = RGB(255,128,128) or ActiveWorkbook.Colors(38) = RGB(&HFF,&H80,&H80) which may be easier to work with. These RGB colours should be available from many sources on the web, or you can paly with the colour palette in Excel to get them. Goto ToolsOptionsColour, click Modify ad on the Custom tab you can play with the colours and see their red, green, blue values. -- HTH RP (remove nothere from the email address if mailing direct) "Gilbert De Ceulaer" wrote in message ... Thanks ! 13408767 is the "reddish" pink but with your information, I was able to look up the value for the darker pink, that is 13409484, and I managed to change it ! BTW, where do you get the values, and how do you make new ones ? Gilbert "Bob Phillips" wrote in message ... Gilbert, This changes it to the pink I have on my system ActiveWorkbook.Colors(38) = 13408767 -- HTH RP (remove nothere from the email address if mailing direct) "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 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing color in palette
I said
However, occasionally it can be impossible to reset an old palette to that of the new. and should have added, that whilst this is unlikely there is also just a remote possibility whilst resetting an old palette with the macro that Excel could crash. So ensure everything is saved before running. Peter "Peter T" <peter_t@discussions wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Bring up Color Palette to select color | Excel Discussion (Misc queries) | |||
Changing Color Palette | Excel Worksheet Functions | |||
Changing the Excel color palette | New Users to Excel | |||
Changing color palette for Excel 2002 | Excel Discussion (Misc queries) | |||
Changing color in color palette | Setting up and Configuration of Excel |