View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
BHatMJ BHatMJ is offline
external usenet poster
 
Posts: 26
Default unable to set the values property of the series class

Thank you for your help but .Formula did not work. The following code seems
to work but will sporadically lock up and then cause the error:

Worksheets(1).ChartObjects(1).Chart.SeriesCollecti on(3).Values = _
Worksheets(2).Range("D3:BK3")

It seems as if all of these should work and I cannot understand why a series
seems to "lock up" after several runs of the program. Once "locked", it
always creates the error. If I delete the chart and re-create a new one, the
code works again.

Can anyone explain or help?


"Ethoros" wrote:

Try

ActiveChart.SeriesCollection(1).Formula = "=results!R4C4:R4C63"

instead of values

"BHatMJ" wrote:

I get this error message "unable to set the Values property of the Series
class" when trying to re-set a chart series to another range. Can anyone
help?

CODE:

Worksheets("analyze").ChartObjects("resChart").Act ivate
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection(1).Values = "=results!R4C4:R4C63"