Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Relative path

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

Gi

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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/

  #3   Report Post  
Posted to microsoft.public.excel.programming
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 *


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Relative path

Oh, wonderful!
Thanx a lot!

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


;

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Relative Path to a Folder Heliocracy Excel Discussion (Misc queries) 3 October 3rd 07 04:28 PM
how to change absolute path to relative path hwijgerse Excel Worksheet Functions 0 November 25th 05 07:18 AM
Absolute vs Relative path K2H Excel Discussion (Misc queries) 2 July 28th 05 12:50 PM
SaveAs and relative path dev[_2_] Excel Programming 2 December 19th 03 02:50 PM
relative path. Bob Kilmer Excel Programming 0 September 12th 03 12:25 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"