spurs
Active Member
- Joined
- Oct 18, 2006
- Messages
- 479
- Office Version
- 2016
- 2013
- 2010
- 2007
- 2003 or older
- Platform
- Windows
I have the following code running fine in excel 2003
With Sheets("TTT").ChartObjects("Chart 1").Chart
.SetSourceData Source:=Sheets("Data").Range("A1:A" & Nreadings), PlotBy:=xlColumns
With .SeriesCollection(1)
.Formula = "=SERIES(,Data!R1C1:R" & Nreadings & "C1,Data!R1C4:R" & Nreadings & "C4,1)"
.Name = "TT Plot"
.Border.ColorIndex = 11
.Border.Weight = xlThin
.Border.LineStyle = xlContinuous
End With
End With
When I run it in excel 2007 i get the folloiwng error on the line
Formula = "=SERIES(,Data!R1C1:R" & Nreadings & "C1,Data!R1C4:R" & Nreadings & "C4,1)"
Method Formula of Object Series Failed
Is there an alternate code to use that is more stable in both excel 2003 and 2007?
With Sheets("TTT").ChartObjects("Chart 1").Chart
.SetSourceData Source:=Sheets("Data").Range("A1:A" & Nreadings), PlotBy:=xlColumns
With .SeriesCollection(1)
.Formula = "=SERIES(,Data!R1C1:R" & Nreadings & "C1,Data!R1C4:R" & Nreadings & "C4,1)"
.Name = "TT Plot"
.Border.ColorIndex = 11
.Border.Weight = xlThin
.Border.LineStyle = xlContinuous
End With
End With
When I run it in excel 2007 i get the folloiwng error on the line
Formula = "=SERIES(,Data!R1C1:R" & Nreadings & "C1,Data!R1C4:R" & Nreadings & "C4,1)"
Method Formula of Object Series Failed
Is there an alternate code to use that is more stable in both excel 2003 and 2007?