Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help - open excel files in excel format

Status
Not open for further replies.

domoputro

IS-IT--Management
Apr 2, 2003
7
US
Hi, I have problem with opening excel files in Access.
Should I use macro in Access?
Because all I find in the macro was importing file from excel to access table.

Help?
 
You have to be more specific with what you need.

1. Do you want to open the Excel document like it is an Excel document, by opening Excel itself? This is possible.
2. Do you want to link to the contents of an Excel document to a table, but not necessarily import the data? This is possible.
3. Do you want to be able to see the Excel datasheet inside a form in Access? If so, this is not possible. (unless someone else here tells you it is indeed possible)




--
Find common answers using Google Groups:

Corrupt MDBs FAQ
 
Thanks for the reply.
Sorry, for the confusion.

I want option no. 1.
Opening an Excel application in Access. Is there a macro function I can assign to?
 
You can't use a macro to open up an Excel document. You have to use VBA. There are two ways:

1. Use ShellExecute: paste in the module ( ) into your database and use fHandleFile("c:\fullpath\fullpath\Your Excel Document.xls") to open the excel document.
2. Use the DOS/command-line based "start" command, like:

Shell "start c:\fullpa~1\fullpa~1\YourEx~1.xls"

You can't use long filenames and will have to find the 8.3-equivalent using method #2.

--
Find common answers using Google Groups:

Corrupt MDBs FAQ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top