User definined filename for DoCmd.TransferSpreadsheet?

aranj

Registered User.
Local time
Today, 12:05
Joined
Feb 18, 2003
Messages
44
User defined filename for DoCmd.TransferSpreadsheet?

My colleagues can't be trusted to import the data into a table using file->get external data -> import!

Everything works using:

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tablename", "Excelfilename", True

But can I get a dialog box up for "Excelfilename" so that they can browse to a file? Or is there another way?

Many thanks.
 
Last edited:
Many thanks, as always.
The same old problem - if I knew what I was looking for (common dialog) I could've found it myself!
Thanks once again.
 
Additional Question

Is there a way to create the table according to the Excel fields and then import the file from excel? My excel files will never have the same fields. Thanks
 
Thanks!!!!!!!!!!11

Pat, Thanks so much!!! I was thinking I needed to custom code adding a blank table with field definitions and then update this table.
 

Users who are viewing this thread

Back
Top Bottom