Best Way to append an existing series in a chart
Hi, I am sure there are plenty of ways to do this, but I have encountered a lot of problems coding VBA lately.
I just want to know what is the most efficient way to continue adding to an existing series on a chart. In other words append the existing series so it can plot more data. I want to do this through VBA, so just extending the chart's series range on the spreadsheet wont work. thankss!
Re: Best Way to append an existing series in a chart
Doesn't the series come from the data - so you'd need to add more data to the excel 'table' area then change the charts source ranges?
Do you have any code/example at the moment?
Re: Best Way to append an existing series in a chart
Well, What I want to do is play around with .SeriesCollection.Values series.
So if I say
Code:
Dim mySeries As Series
mySeries = ChartObjects("Chart 1").SeriesCollection(1).Values
'would like to add more data to mySeries
How would I play around with mySeries? I can not treat it liek a string by using the string functions since it is type Series.
Re: Best Way to append an existing series in a chart
Ok I found out you can use this method from MSDN:
Worksheets(1).ChartObjects(1).Chart. _
SeriesCollection.Extend Worksheets(1).Range("c1:c10")
but that probably appends the .Values property of SeriesCollection.
How can I append the .Xvalues property also?