• Opening an existing Excel workbook (Access/Excel 03)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Opening an existing Excel workbook (Access/Excel 03)

    Author
    Topic
    #438333

    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

    Viewing 0 reply threads
    Author
    Replies
    • #1044860

      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

    Viewing 0 reply threads
    Reply To: Opening an existing Excel workbook (Access/Excel 03)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: