Import macro without specifying file name

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.
 
G

Guest

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"
 
S

Steve Schapel

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"
 

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