Open excel file

Johny

Registered User.
Local time
Today, 22:33
Joined
Jun 1, 2004
Messages
80
Hi,

I got an excel workbook, containing a chart sheet and a data sheet. I want to save the excel workbook in my access db. When the users clicks a button to view the chart, I would open the excel workbook.
I first thought to save the excel file as an OLE object in my table, but I read I got to extract the file before I can open it, so I tought of another solution:
I created a form with an Unbound OLE object inside (my excel file), while clicking the button, I would open the form ("visible=false") and place the following code in the form_load event
Code:
    Set myBook = Me.OLEGraph.Object
    mybook.SaveCopyAs "copy.xls"

But I think there must be a better solution: is there a way, so I can open a new workbook which is an exact copy of my OLE object (and when the user closes the workbook, the application asks where to save the file)

Anybody?

Johny
 

Users who are viewing this thread

Back
Top Bottom