E
EAB1977
I have Excel 2007 and trying to make this compatible with users that
have Excel 2002/2003.
I am having a hard time with the code below. When I change a specific
series from a stacked chart to a line and then try to change the
color, I am not successful. I am successful with changing the chart
type, however.
'Create the Average Line
.ActiveChart.PlotArea.Select
.ActiveChart.SeriesCollection.NewSeries
y = .ActiveChart.SeriesCollection.Count
.ActiveChart.SeriesCollection(y).Values = "=Sheet2!R" & intRow
+ 1 & "C2:R" & intRow + 1 & "C" & rst.Fields.Count
.ActiveChart.SeriesCollection(y).Name = "=""Average"""
.ActiveChart.SeriesCollection(y).Select
.ActiveChart.SeriesCollection(y).AxisGroup = 1
.ActiveChart.SeriesCollection(y).ChartType = 4
.ActiveChart.SeriesCollection(y).Interior.Color = RGB(0, 0, 0)
I have tried everyhing and I can't figure it out. Any help you can
shed will be greatly apprecitated.
have Excel 2002/2003.
I am having a hard time with the code below. When I change a specific
series from a stacked chart to a line and then try to change the
color, I am not successful. I am successful with changing the chart
type, however.
'Create the Average Line
.ActiveChart.PlotArea.Select
.ActiveChart.SeriesCollection.NewSeries
y = .ActiveChart.SeriesCollection.Count
.ActiveChart.SeriesCollection(y).Values = "=Sheet2!R" & intRow
+ 1 & "C2:R" & intRow + 1 & "C" & rst.Fields.Count
.ActiveChart.SeriesCollection(y).Name = "=""Average"""
.ActiveChart.SeriesCollection(y).Select
.ActiveChart.SeriesCollection(y).AxisGroup = 1
.ActiveChart.SeriesCollection(y).ChartType = 4
.ActiveChart.SeriesCollection(y).Interior.Color = RGB(0, 0, 0)
I have tried everyhing and I can't figure it out. Any help you can
shed will be greatly apprecitated.