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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find excel file for import

Status
Not open for further replies.

ali32j

Technical User
Apr 23, 2007
97
0
0
GB
Hi All

I want to use the following code to import a spreadsheet

DoCmd.TransferSpreadsheet acImport, 8, "Yourtablename", "filepath of spreadsheet", True, "Sheet2!A1:E273"

Is it possible to change the "your table name" to pop up a dialog box to locate the file??

your help is much appreciated

thanks

Ali
 
You could use vba InputBox function and string variable to store and validate input.

combo
 
thanks for your help much appreciated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top