Open an Excel file

  • Thread starter Thread starter Slez via AccessMonster.com
  • Start date Start date
S

Slez via AccessMonster.com

How do I go about opening an Excel file from an Access form?

I'd like to enable users to open an Excel file via a command button. I don't
want to link the data in any way, just allow users to view and then close
when they're done, so they can return to the form they were working in.

Thanks
Slez
 
There are 3 ways that come to mind.

The easiest is to use the followhyperlink

Example:
Application.Followhyperlink "c:\MyFile.xls"

An alternative would be to use the Shell command.

Access MVPS site also has an API to launch programs you could use it in this
case as well http://www.mvps.org/access/api/api0018.htm

Daniel
 
Application.Followhyperlink worked perfectly!
Thanks!
Slez
There are 3 ways that come to mind.

The easiest is to use the followhyperlink

Example:
Application.Followhyperlink "c:\MyFile.xls"

An alternative would be to use the Shell command.

Access MVPS site also has an API to launch programs you could use it in this
case as well http://www.mvps.org/access/api/api0018.htm

Daniel
How do I go about opening an Excel file from an Access form?
[quoted text clipped - 4 lines]
Thanks
Slez
 
Is there a way to check if that file is open already first? As you know,
Excel does not let you open more than 1 file of the same name at the same
time.
 

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

Back
Top