Relative path

  • Thread starter Thread starter Giovaz
  • Start date Start date
Giovaz > said:
How can I put in a variable the path where the excel file reside?

Hi Gio,

Dim sPath As String
sPath = ThisWorkbook.Path

or

sPath = ActiveWorkbook.Path

if your code is running in a different workbook from the one whose path you
want to store.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
 
Oh, wonderful!
Thanx a lot!

...the stupid things are always the forgotted ones...


;
 

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