Hi Metin,
although I understood what you want to do, I do not
understand what your macro shall do - sorry...
nevertheless I found some errors:
Sub Testi_1()
Set wks = Worksheets("Calculated Data")
v = 2
w = 5
For i = 1 to 3
exSh.Select
What is exSh ? Is this object defined before? Otherwise
excel cannot select it.
Set rng = Range("C2:S97")
xWT = Range(rng, "WT", rng.Offset(0, v))
yWT = Range(rng, "WT", rng.Offset(0, w))
ActiveChart.SeriesCollection(3).XValues = xWT
ActiveChart.SeriesCollection(3).Values = yWT
ActiveChart.SeriesCollection(3).Name = "=""ASP
Reference samples"""
v = v + 1
w = w + 1
Within your loop you haven't used i... so it is no real
loop because it just runs once.
Maybe you wanted to use SeriesCollection(i) instead? I
don't really know...
Next
This is no close statement for a for-loop. Next must
define which variable should be used... so use "Next i".
End Sub
Maybe that helps a little bit?
Best
Markus
|