View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Set color for chart serie in excel 2007/2010

In Excel 2007 customs charts are saved as chart templates. Manually look at
Change ChartType, Templates. In VBA help look at AddChartAutoFormat and
ApplyChartTemplate

Your other question is very vague, try and explain with some detail. Eg, do
you have a set of colours, what ChartType are your series, eg bar or line.
and looking to change fill/interior or border/line.

Regards,
Peter T


"Lina" wrote in message
...
Hi,
Thank you for your answer and maybe you can help me a bit further. I have
to
rewrite some code that was written for excel xp and that doesnt work so
god
(for many different reasons) The old code uses customcharts
(xxx.Chart.ApplyCustomType ChartType:=xlUserDefined, TypeName:="test") but
I
understand that it's better to use the new chartstyles (is it?) since the
customcharts not will be supported further on (is this right?)

I would like to make a button that loops all series in the selected chart
and changes the color. My problem is that I must handle each diagram type
of
serie and Im not sure how to do this the best way so that I cover as many
charttypes as possible without having runtime error.

thanks

"Peter T" wrote:

As you say only six basic colours are available. However each subsequent
set
of six is a shade lighter, although each incremental difference in shade
is
not very noticeable from the previous set.

One approach is to define at least as many colours in RGB format as
you'll
need, then a simple macro can apply them in order to your series. Post
back
if not sure how to go about that, and say how many colours you'll need.

Regards,
Peter T


"Lina" wrote in message
...
Hi!
I want to do a macro that sets the color for the chart series to the
color
the company has desided to use. We have a theme but we can only set
color
for
the first 6 series and we often use much more series.
I have understod that this isnt so easy as to loop thru the series and
set
the color since the color is set on different ways depending on the
charttype
for the serie, or is it a way to do this so it works for all chart
types?

thanks



.