Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bring up Color Palette to select color pokdbz Excel Discussion (Misc queries) 4 August 6th 07 10:13 PM
Changing Color Palette kaldon Excel Worksheet Functions 2 April 4th 06 01:28 AM
Changing the Excel color palette Don McClure New Users to Excel 2 April 4th 06 12:00 AM
Changing color palette for Excel 2002 Glenn Chung Excel Discussion (Misc queries) 1 May 5th 05 08:22 PM
Changing color in color palette Dave Peterson Setting up and Configuration of Excel 0 December 12th 04 02:39 PM


All times are GMT +1. The time now is 12:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"