View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default How to use Cells property to Range object?

Exactly!

--

HTH

RP
(remove nothere from the email address if mailing direct)


"deko" wrote in message
om...
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!