Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to add a bunch of series to a chart. I want to use a loop to do so
and set the properties of the new series like this: For x To y Set objSeries = objChart.SeriesCollection.NewSeries With objSeries .Values = xlapp.Workbooks(strXlsFile).Worksheets(sn(i)).Rang e(Cells(2, 4), Cells(10, 4)) .[set other series properties] End with Next x But the range I'm trying to assign to the Values property of the new series throws an error: 1004 Application-defined or object-defined error If I use Range("D2:D20") it works fine, but I want to use the Cells property within the Range property to define the Range object - so I can increment the row and column index within the loop. Why is Range(Cells(2, 4), Cells(10, 4)) not working? Thanks in advance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using The Value property of the ActiveCell object | Excel Programming | |||
Using Select with Range.Cells property | Excel Programming | |||
How to check if an object has a certain property? | Excel Programming | |||
Page Object property | Excel Programming | |||
Can Range.Find search a Cells' Text property? | Excel Programming |