Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a chart in a worksheet, the chart is a stacked column chart with 6
series and I want to programmatically changed the names of each of the data series. I can do this just fine if I do it manually. When I use the macro recorder and try to run the recorded code I get the Following error: 1004 Unable to set the Name property of the Series class I have no idea why this is the case, Interestingly enough when I use the on error resume next, I find that I am able to change the name of the first series and the sixth series with no problems but data series 2-5 all generate the same error. I am using excel 2000 on windows xp pro. I will also post another message in reply to this one with the excel spreadsheet and some testing code in a module(which I pasted below). -J Sub Macro1() On Error Resume Next Sheets("Acquisition (Donor Value)").Select ActiveSheet.ChartObjects("Chart 2").Activate ActiveChart.SeriesCollection(1).Name = "=""a1""" Debug.Print "#1 " & Err.Number & " " & Err.Description Err.Clear ActiveChart.SeriesCollection(2).Name = "=""a2""" Debug.Print "#2 " & Err.Number & " " & Err.Description Err.Clear ActiveChart.SeriesCollection(3).Name = "=""a3""" Debug.Print "#3 " & Err.Number Err.Clear ActiveChart.SeriesCollection(4).Name = "=""a4""" Debug.Print "#4 " & Err.Number Err.Clear ActiveChart.SeriesCollection(5).Name = "=""a5""" Debug.Print "#5 " & Err.Number Err.Clear ActiveChart.SeriesCollection(6).Name = "=""a6""" Debug.Print "#6 " & Err.Number Err.Clear End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
User Selectable Series and Number of Series for Line Chart | Charts and Charting in Excel | |||
how to plot column chart with one series against multiple series. | Charts and Charting in Excel | |||
Error in chart with 2 different series... | Charts and Charting in Excel | |||
chart data series -- plot a table as a single series | Charts and Charting in Excel | |||
How to I incorporate SD from a data series into chart error bars? | Charts and Charting in Excel |