How to open an Excel file from an encoded File Dialog Box??

G

Guest

Hi All

I have implemented some code in my Access Form, which will display an Open File Dialog when you click on a button. The File Open Dialog opens fine, but nothing happens when I have selected the file to open (in this case an Excel File..). .The code (which I got from a link in this community) only picks the filename, but doesn't do anything with it

My question is how do I open the file, now that I have the full path. It should be simple, but I seem to be lost anyway.. :-

All help is much appreciated :-
Humle
 
D

Douglas J. Steele

The most flexible approach is to use the ShellExecute API. This will let you
pass it any file name, and, assuming the file extension is registerd, it
will open the file in the appropriate application.

See http://www.mvps.org/access/api/api0018.htm at "The Access Web" for
sample code.

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)



humle said:
Hi All,

I have implemented some code in my Access Form, which will display an Open
File Dialog when you click on a button. The File Open Dialog opens fine, but
nothing happens when I have selected the file to open (in this case an Excel
File..). .The code (which I got from a link in this community) only picks
the filename, but doesn't do anything with it.
My question is how do I open the file, now that I have the full path. It
should be simple, but I seem to be lost anyway.. :-(
 

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