transferspreadsheet

G

Guest

I have a macro that uses transferspreadsheet to import an
excel file into the database. In my filename, I currently
have "c:\sales.xls". I would like to let the user choose
the file.

How would I do this?

Thanks
 
S

Steve Schapel

You could put an unbound textbox on a form, where the user can enter the
path and file name of the Excel file, and then in the File Name argument
of the macro you could refer to this textbox, using syntax such as...
=[Forms]![NameOfForm]![NameOfTetxbox]

If you want the user to be able to navigate to the required file using a
Windows dialog, the information here may be of interest...
http://www.mvps.org/access/api/api0006.htm
 
G

Guest

thank you much
-----Original Message-----
You could put an unbound textbox on a form, where the user can enter the
path and file name of the Excel file, and then in the File Name argument
of the macro you could refer to this textbox, using syntax such as...
=[Forms]![NameOfForm]![NameOfTetxbox]

If you want the user to be able to navigate to the required file using a
Windows dialog, the information here may be of interest...
http://www.mvps.org/access/api/api0006.htm

--
Steve Schapel, Microsoft Access MVP


I have a macro that uses transferspreadsheet to import an
excel file into the database. In my filename, I currently
have "c:\sales.xls". I would like to let the user choose
the file.

How would I do this?

Thanks
.
 

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