transferspreadsheet

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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
.
 
Back
Top