Exporting Microsoft Graph Object from Access

R

Rehan

Hello there!

I have a small problem and hope you guys can help. Its really nothing big.

I am new to Access VBA programming. I made a button to export a graph
embedded as a picture in an Access form. The for this button is:

Dim graphExport As Object

Set graphExport = Me.Ctl3PPContractChart.Object
graphExport.Export "C:\Graph1.jpg", "JPEG"
Set graphExport = Nothing
Me.Ctl3PPContractChart.Action = acOLEClose

It works. The graphs gets exported. The problem is that all the setting that
had been made to the graph previously get messed up.

Any reason as to why that happens and what can be the solution?

Another question: I have a combo box from where i select the graph to be
exported. Can i have all the graphs exported using VBA code, if yes, then how?

I would really appreciate if i can have a solution to this problem. Thank
you for your help!
 

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

Top