prompting file name

  • Thread starter Thread starter susanne3567
  • Start date Start date
S

susanne3567

I have a macro that I need to have the user type in the file name that the
macro is going to import. I have been thrown into development of a database
that is to import certain files from excel, but have a different designation
according to location. example: XYZ03262008.xls would be the name of the
file one month; XYZ04262008.xls would be the name next month. I want the
user to click the button on the form and the macro give a prompt for the file
name, click ok, then the macro proceed with the processes.

Also, when they are through with the process, can the macro also prompt to
name the finished table as XYZ03262008_final?

Thanks for your help!
Susanne
 
You can use an expression in the filename argument of a TransferText or
TransferSpreadsheet macro action:

="C:\TheFolder\" & InputBox("Enter file name:", "FileName")
 
Back
Top