Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Opening an existing Excel workbook (Access/Excel 03)

    What I would like to to is send information from Access to an exsisting Excel workbook. The data needs to be sent monthly to different tabs. I know very little about the process. I am positive that I must use the late binding method since there are several different versions of Excel and Access. All of the examples show the creating of a new workbook and worksheet not. an existing. I have been poking around in the knowledge base and in this forum. The other issue would be that the designation Excel workbook will be stored in different locations on the manager's system or U drive. Thank you. Fay

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Opening an existing Excel workbook (Access/Exc

    Here is a procedure (without error handling) that uses late binding and will open an Excel file. You pass it the full path and name of the file you want to open.


    Sub OpenExcelfile(strfilename As String)

    Dim xl As Object
    Dim xldoc As Object
    Set xl = CreateObject("Excel.Application")
    Set xldoc = xl.Workbooks.Open(strfilename)
    xl.Visible = True
    End Sub
    Regards
    John



Posting Permissions

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