|
|
|
date: Fri, 9 May 2008 12:02:53 -0700 (PDT),
group: microsoft.public.excel.macintosh
back
Setting chart series color
I am running Excel 2004 for the Mac on OSX 10.5.2.
I would like to set the color of a chart series from RGB values stored
in cells of the worksheet.
I recorded a macro to get this piece of code:
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection(7).Select
With Selection.Border
.Color = RGB(0, 0, 0)
.LineStyle = xlNone
.Transparency = 0
End With
With Selection
.MarkerBackgroundColor = RGB(252, 243, 5)
.MarkerForegroundColor = RGB(252, 243, 5)
.MarkerStyle = xlSquare
.Smooth = False
.MarkerSize = 5
.Shadow = False
.MarkerTransparency = 0
End With
The given RGB values are from the color picker, I would read them in
from the worksheet.
The problem is that if I manually change the color, and then run the
macro the color remains the one that I manually chose not the one
prescribed in the macro. If I change the Markersize to something other
than 5, that change is made. What gives????
date: Fri, 9 May 2008 12:02:53 -0700 (PDT)
author: unknown
Re: Setting chart series color
On May 9, 3:02 pm, "brujol...@gmail.com" wrote:
> I am running Excel 2004 for the Mac on OSX 10.5.2.
>
> I would like to set the color of a chart series from RGB values stored
> in cells of the worksheet.
>
> I recorded a macro to get this piece of code:
>
> ActiveSheet.ChartObjects("Chart 1").Activate
> ActiveChart.ChartArea.Select
> ActiveChart.SeriesCollection(7).Select
> With Selection.Border
> .Color = RGB(0, 0, 0)
> .LineStyle = xlNone
> .Transparency = 0
> End With
> With Selection
> .MarkerBackgroundColor = RGB(252, 243, 5)
> .MarkerForegroundColor = RGB(252, 243, 5)
> .MarkerStyle = xlSquare
> .Smooth = False
> .MarkerSize = 5
> .Shadow = False
> .MarkerTransparency = 0
> End With
>
> The given RGB values are from the color picker, I would read them in
> from the worksheet.
>
> The problem is that if I manually change the color, and then run the
> macro the color remains the one that I manually chose not the one
> prescribed in the macro. If I change the Markersize to something other
> than 5, that change is made. What gives????
I forgot to sign off
Bror Hultgren
date: Fri, 9 May 2008 12:09:21 -0700 (PDT)
author: unknown
|
|