Results 1 to 2 of 2

Thread: [ACCESS] Open Excel file

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    13

    [ACCESS] Open Excel file

    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?

    Eld0

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: [ACCESS] Open Excel file

    Programmatically save the excel file in the dbs folder? Then you can reopen??

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width