Open an Excel file

  • Thread starter Slez via AccessMonster.com
  • 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
 
D

Daniel

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
 
S

Slez via AccessMonster.com

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
 
D

David

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.
 
Top