This is an issue that I've discusses many times before, but never with a conclusive solution. I am trying to programmatically change the data range for an existing chart in Excel. My code goes something like this:
.XValues =DataWS.Range("A1:A101") '<-----ERROR!
.Values = DataWS.Range("B1:B101")
The .XValues line results in the "1004 Unable to set the XValues property of the Series class" error. The range contains valid data: numbers, no blanks. When I manually set the chart to this range, everything is fine. Like I said, I've read many people having this problem, but nothing is working for me. I've had no end of trouble dealing with Excel charts. Sometimes they work, sometimes they don't.
I found that this bug cause the program not working only when you do a presentation in front of managers. then it crash :(
but my solution for this is to run-over all the range (or array, in my case) and make it a string
this is the code for the string (pointing every time on Reported (N):