How to use Cells property to Range object?
Have you tried this?
For x To y
Set objSeries = objChart.SeriesCollection.NewSeries
With objSeries
Set rng = xlapp.Workbooks(strXlsFile).Worksheets(sn(i))
.Values = rng.Range(rng.Cells(2, 4), rng.Cells(10,4))
.[set other series properties]
End with
Next x
That works great! Thanks!
I have an object defined in scope that holds the worksheet, so it looks
likes this:
..Values = objSheet.Range(objSheet.Cells(2, 4), objSheet.Cells(10, 4))
So I guess 'Range(Cells(2, 4), Cells(10, 4))' is meaningless because the app
does not know where the Cells are - at least in the context of automation.
Thanks for the help!
|