Import macro without specifying file name

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

Guest

I've created a macro that will automatically import a table from a specific
file (by using TransferText action). But is there a way to only specify that
specific folder where I want to import. I would like to import several
different files that will have different names. All files will be in the
same folder. So I would just want the macro to automatically bring me to
that folder and then I can specify which file to import.
 
I found an answer from a previous post. But I am getting an error message
that "The Microsoft Jet Database engine could not find the object '" &
InputBox("Enter file name") & ".xls"

Is there something wrong with the way I typed the path:

C:\my documents\" & InputBox("Enter file name") & ".xls"
 
Markantesp,

Looks like you have missed the " at the very beginning of the
expression, and also I believe you will need a = at the beginning as well...
="C:\My Documents\" & InputBox("Enter file name") & ".xls"
 
Back
Top