Hi All,
I have recorded a macro to generate some graphs in excel 2003. The code snippet is as follows:
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).XValues = "=RawData1!R" + sRowCountStart + "C1:R" + sRowCountEnd + "C1"
ActiveChart.SeriesCollection(1).Values = "=RawData1!R" + sRowCountStart + "C8:R" + sRowCountEnd + "C8"
ActiveChart.SeriesCollection(1).Name = "=RawData1!R1C8"
ActiveChart.SeriesCollection(2).XValues = "=RawData1!R" + sRowCountStart + "C1:R" + sRowCountEnd + "C1"
ActiveChart.SeriesCollection(2).Values = "=RawData1!R" + sRowCountStart + "C7:R" + sRowCountEnd + "C7"
ActiveChart.SeriesCollection(2).Name = "=RawData1!R1C7"
where sRowCountStart and sRowCountEnd are the variables. Now when I am executing this code with excel 2007 it is giving me the unexpected results where it is selecting all the columns available in RawData1 instead of column 1 and cloumn 7.
Is there any dependency in excel versions? Any help would be much appreciated.
Thanks in advance.
Bookmarks