Thread: Relative path
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rob Bovey Rob Bovey is offline
external usenet poster
 
Posts: 811
Default Relative path

"Giovaz " wrote in message
...
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 *