Open excel file from access

  • Thread starter Thread starter John
  • Start date Start date
J

John

I have a program that inputs information into an excel
file. After I am done with the import, I want to open the
excel file for the user to see and I can't seem to get the
file to open. If someone knows the answer I would greatly
appreciate it.

THANKS
John
 
To avoid having to set references to EXCEL in the database, it's better to
use late binding:

Dim objExcel As Object
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
objExcel.Workbooks.Open "PathAndFileName"

etc.

Be sure to set all objects to Nothing before the code ends.
 
Back
Top