Local file read

  • Thread starter Thread starter Al
  • Start date Start date
A

Al

Hello all,

I am trying to get a macro to open another excel file local to the
worksheet that the macro is in. So far, only absolute paths have
worked.

I have tried "." and "./" in front of the file name, but to no avail.
Is it possible to do this without an absolute path?

Thanks!
-=Al
 
I guess it depends on how you are trying to use it, but:

? dir(activeworkbook.FullName)
file2.xls
? dir(activeworkbook.Path & "\")
file2.xls
? dir(activeworkbook.Path & "\.")
file2.xls

if I then drag in a .txt file to the same directory as the workbook

? dir(activeworkbook.Path & "\*.txt")
August31.txt
 

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

Back
Top