Thread: Local file read
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Local file read

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



--
Regards,
Tom Ogilvy


"Al" wrote in message
om...
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