View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.charting
ShaneDevenshire ShaneDevenshire is offline
external usenet poster
 
Posts: 2,344
Default Colours in user-defined charts

Hi Fredrik,

As you have discovered the you can change the user defined colors for any
workbook but the pallete is workbook specific. If all the colors you want to
use are in the default pallete then you can create a User Defined custom
chart using any of those colors and they will be available in all workbooks
when you applie the User Defined chart. The downsides of this approach are
1. you must create a user defined chart for each of the chart types you use,
2. user defined charts don't retain all attributes so if the charts are fancy
you may loose some features such as linked titles or linked data lables, 3.
to apply the new colors used in the default chart requires a number of steps.
4. If all of the colors you want to use are not in the default pallete then
the above approach fails.

An easier way to deal with the problem might be to create a custom color
pallete for the personal macro workbook and add a macro that imports that
pallete into any workbook. Assuming you have created the custom pallete in
the Personal Macro Workbook then the code you need to add to the PMW is very
simple:

Sub CustomChartColors()
' Keyboard Shortcut: Ctrl+Shift+C

ActiveWorkbook.Colors = Workbooks("PERSONAL.XLS").Colors
End Sub

The shortcut key is optional.

Alternately you could create a macro that redefines the colors of the
pallete in any workbook and place that macro in the personal macro workbook.

With either of these two approaches you will need to add the macro or the
macro and the pallete to the personal marco workbook of each user. Of course
you don't need to use the personal macro workbook, you could use an XLA. The
advantage of an XLA is that you don't need to mess with the PMW which may
already have thing in it. And a single copy of the XLA can live on a server.

Sincerely,
Shane Devenshire


"Fredrik E. Nilsen" wrote:

I have one more question about user-defined charts:

Is it possible to define the colours to be used? I can change the
colours in usrgal.xls but when I apply the user-defined chart, the
colurs revert to those in the current workbook.

Any way around this? The users can not be expected to import the
colours for every book and they have a lot of old books in wich they
are going to use the new colour-set.

--
Fredrik E. Nilsen