MACRO QUERY - how to enable user to "browse" for the "file name"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've set up a transfer spreadsheet macro to import data automatically into my
Access database.

In the macro section, I have to enter a file name...

I know how to get a lookup box to ask the user to manually enter the
filename. However, what I would prefer is to give the user the opportunity to
BROWSE for the file rather than have to manually enter the path for the file.

Is there a way this can be done?

Any help would be gratefully appreciated.

David Hawes :-)
 
You can't do that from a macro. You could use the file dialog box on a form
and reference the file name found in your macro.
For file dialog box on a form go to
http://www.mvps.org/access/api/api0001.htm
To reference the control name you added on the form from the file dialog box
where the file name in the macro use
=[Forms]![NameOfForm]![NameOfTextbox]
 
Back
Top