What does the .values property of SeriesCollection(1) refer to prior to
setting it to that range? If it contains all blanks or all errors, and it's
a line or XY chart, Excel VBA cannot assign anything to the series .Name,
..XValues, or .Values properties. Also, if both x and y are greater than 1,
Excel will not want to assign the range to a series. Only ranges that
contain a single cell, row, or column are valid entries.
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______
"matelot" wrote in message
...
I use the following code to assign a range in my macro. I checked with
other
webite and the syntax seems to be correct.
Activesheet.chartobjects("Chart 1").activate
set rng = activesheet.range(cells(1,1), cells(x, y))
Activechart.seriescollection(1).values = rng
x and y are variables I set earlier in the code.
The error message I get is "run time error 1004. Unable to set the values
property of the series class
Thanks for the help.