Thanks for the reply - I fixed it by ditching the range reference and converting the whole thing to a string and looping it for my sheet.
'graphing portion
Set rng4 = Range("A2") 'the XXX plant that makes sure we're not overloading data
Set rng3 = Range("D1:O4") 'this is the range of the graph data - no labels included
t = 0 'sets the start of the graphs at the top of the spreadsheet
x = 0 'using r1c1 language to get the title right
x2 = 0 'same thing for middle part of string
x3 = 0 'same thing for last part of string
While rng4.Value <> "" 'makes sure there is something to stop the loop
Set Chartsheet = ActiveSheet 'not sure if this is necessary
tempstr = Chartsheet.Cells(x + 2, 1) & " " & Chartsheet.Cells(x2 + 2, 2) & " " & Chartsheet.Cells(x3 + 2, 3)
With Chartsheet.ChartObjects.Add _
(Left:=100, Width:=375, Top:=t, Height:=225)
.Chart.SetSourceData Source:=rng3
.Chart.ChartType = xlXYScatterLines
.Chart.HasTitle = True
.Chart.ChartTitle.Text = tempstr
x = x + 4
x2 = x2 + 4
x3 = x3 + 4
End With
Set rng4 = rng4.Offset(4)
Set rng3 = rng3.Offset(4, 0)
t = t + 225
Wend
Pretty amateurish, but it works. Thanks again for the quick reply!
Bookmarks