Copying graphs

  • Thread starter Thread starter Luke Bellamy
  • Start date Start date
L

Luke Bellamy

Hi - I have a graph (Microsoft Graph Chart) on a form that I generate with a
row source value list on_load. This works fine and the graphs show the
correct
values.
What I have implemented is the ability to export this to Excel. Basically I
open
the graph as above, then set focus on the graph, docmd and copy the graph
into the clip board and then using the Excel library I open up a worksheet
and
run the Excel paste function. This process works fine.

To replicate this steps manually I could open the form with the graph on it.
Select
the graph with my mouse, copy it, then open excel and select paste. And this
works in mdb and mde (see below).
BUT what happens is when I run it fully automated through code the graph
does
not show the right values. Instead of loading the values I assigned to it in
the form_load
event it simply copies the graph as it was at the last save while I was
designing it.
The funny thing is this all works 100% when I run it as an mdb, just not as
an mde.

I've tried putting repaints and do events to ensure that the graph loads
properly before copying
it but it still does not seem to work.

Any ideas or suggestions would be appreciated.

Thankyou
 
Fixed it - what I did was use the 'update' event on the graph that fires
after the graph has completed the update and display. Then I copied
it and exported to Excel.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top