L
L Mehl
I can change the name, X- and Y-values in series #1 with the following code:
ActiveChart.SeriesCollection(1).Name = _
strNameSeries
ActiveChart.SeriesCollection(1).XValues = _
Worksheets("Data_Series").Range(strRangeSeries)
ActiveChart.SeriesCollection(1).Values = _
Worksheets("Data_Series").Range(strRangeYVal)
but I can't revise series #3, when I change
SeriesCollection(1)
to
SeriesCollection(3) in the above code.
I get the error: "Unable to get the Name property ..."
The third series shows a Name and X- and Y-values in the Source Data|Series
dialog box.
Can someone tell me why I get this error?
Understanding this is important for me because I will provide the user with
a template Chart containing 9 dummy series, as placeholders for real data.
The user will import a text file into one of the 9 dummy series, changing
the Name, X- and Y-values.
Is it correct to ask the user which order number is to be replaced, and use
this in code as above?
If not correct, can someone describe how to address the series for which I
want to change Name, X- and Y-values?
Thanks for any suggestions.
Larry Mehl
ActiveChart.SeriesCollection(1).Name = _
strNameSeries
ActiveChart.SeriesCollection(1).XValues = _
Worksheets("Data_Series").Range(strRangeSeries)
ActiveChart.SeriesCollection(1).Values = _
Worksheets("Data_Series").Range(strRangeYVal)
but I can't revise series #3, when I change
SeriesCollection(1)
to
SeriesCollection(3) in the above code.
I get the error: "Unable to get the Name property ..."
The third series shows a Name and X- and Y-values in the Source Data|Series
dialog box.
Can someone tell me why I get this error?
Understanding this is important for me because I will provide the user with
a template Chart containing 9 dummy series, as placeholders for real data.
The user will import a text file into one of the 9 dummy series, changing
the Name, X- and Y-values.
Is it correct to ask the user which order number is to be replaced, and use
this in code as above?
If not correct, can someone describe how to address the series for which I
want to change Name, X- and Y-values?
Thanks for any suggestions.
Larry Mehl