Current Directory in Excel

D

Dave Harry

What's an easy way to get the current directory of an existing workbook,
using a macro in that workbook?

I wish to import a text file from the same (but changing) folder as the .XLS
when the XLS is opened.

Thanks in advance
 
A

Andy Pope

Hi,

Activeworkbook.Path

Note this will only return a value once the workbook has been saved.

Cheers
Andy
 
D

Dave Harry

Perfect.
Thanks Andy.

--
Dave Harry

Andy Pope said:
Hi,

Activeworkbook.Path

Note this will only return a value once the workbook has been saved.

Cheers
Andy
 

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