View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier Jon Peltier is offline
external usenet poster
 
Posts: 6,582
Default Problem with reloading graphs! (References to Nameranges)

Instead of deleting and putting back the sheet (presumably with new data)
can you paste the new data over the old? Use paste special - values or paste
special - formulas if a regular paste also messes up the links.

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


wrote in message
ps.com...
Hi everyone,

Okay, lets see if somebody can help me with this. I have my little
graphics with some nameranges references:

ie:name ='Data-Daily'!F1
y values= 'Data-Daily'!Yvalues
x values= 'Data-Daily'!Xvalues

Now, the problem comes when I delete Data-Daily (because I want to
refresh the data or just any reason. My graph is too smart and the
references become #REF# because of course the sheet doesn't exist
anymore.

I have tried to use manual calculation and CALCULATE on the VBA code to
solve this. But even if the graph stays now the same, the references
are still changed.

Is there a way in VBA to cancel this automatic update of the ranges in
the graph so I can delete the sheet, put it back and then press F9 or
run CALCULATE to have them reloading correctly every time?

Regards,

Yona