conversion problem 2003 to 2007

spurs

Active Member
Joined
Oct 18, 2006
Messages
430
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?
 

Some videos you may like

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Watch MrExcel Video

Forum statistics

Threads
1,108,728
Messages
5,524,486
Members
409,584
Latest member
RedHelp

This Week's Hot Topics

Top