Open excel file from access

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
 
K

Ken Snell

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top