View Single Post
  #4   Report Post  
Jon Peltier
 
Posts: n/a
Default

You cannot get the source data range of the entire chart. Sometimes when you open
the Source Data dialog you see it in the Data Range tab, sometimes you don't, but
Excel never shares this information with VBA.

You can get the data range for a single series by parsing the series formula. That's
a real pain, so we're all very grateful to John Walkenbach for writing a class
module to do this for us, and sharing it on his web site:

http://www.j-walk.com/ss/excel/tips/tip83.htm

Your objective seems rather daunting, to say the least.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

jj wrote:

I am trying to change the datasource of an existing chart
in VBA. Is there a way to do this in VBA. Our isssue is that we are moving to
another source.

So the example would be we take a range from an existing worksheet and move
this to a new worksheet with the chart, but not in the same range. So the
variables would be that we need to adjust the source range be the difference
in the row or columns for each of the series. The main issue is how do we get
the data source of the existing chart series?

Thanks for any help.