VBA- SeriesCollection(1).Value error

  • Thread starter Thread starter crossplatform
  • Start date Start date
C

crossplatform

What's wrong with this code:


Worksheets("sheet1").ChartObjects("Chart 1").Chart. _
SeriesCollection(1).Value = "=Sheet1!R1C1:R20C1"


It gives me run-time error '438' object doesn't support this propert
or method
 
crossplatform > said:
What's wrong with this code:


Worksheets("sheet1").ChartObjects("Chart 1").Chart. _
SeriesCollection(1).Value = "=Sheet1!R1C1:R20C1"


It gives me run-time error '438' object doesn't support this property
or method.

value is not a valid property of SeriesCollection. what exactly are you
trying to do; add a new series or replace an existing series or something
else?
Paul D
 
Worksheets("sheet1").ChartObjects("Char
1").Chart.SeriesCollection(1).Value = "=Sheet1!R1C1:R20C1"



Well, I'm trying to update the chart's series range. The followin
works perfectly:


ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.SeriesCollection(1).Values = "=Sheet1!R1C1:R20C1"

But I dont want to activate the sheet and the chart :(
Any suggestion
 
Back
Top