ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Relative path (https://www.excelbanter.com/excel-programming/303924-relative-path.html)

Giovaz

Relative path
 
How can I put in a variable the path where the excel file reside?

Gi

--
Message posted from http://www.ExcelForum.com


Frank Kabel

Relative path
 
Hi
e.g.
dim spath
spath=activeworkbook.path

--
Regards
Frank Kabel
Frankfurt, Germany


How can I put in a variable the path where the excel file reside?

Gio


---
Message posted from http://www.ExcelForum.com/


Rob Bovey

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 *



Giovaz[_2_]

Relative path
 
Oh, wonderful!
Thanx a lot!

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


;

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 12:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com