prompting file name

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
 
K

Ken Snell \(MVP\)

You can use an expression in the filename argument of a TransferText or
TransferSpreadsheet macro action:

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

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