PC Review


Reply
Thread Tools Rating: Thread Rating: 5 votes, 5.00 average.

How to get file's current directory path to a string in VBA?

 
 
wenkej@nj.sc.mcel.mot.com
Guest
Posts: n/a
 
      16th Oct 2003
In my VBA I needed to get some data from another Excel
file located in the same directory with current host excel
file.How could I got the current file's path ,something
the same as "../" in UNIX?
Thanks!
 
Reply With Quote
 
 
 
 
Harald Staff
Guest
Posts: n/a
 
      16th Oct 2003
Sub test()
Dim sPath As String
sPath = ActiveWorkbook.Path
MsgBox sPath
End Sub

--
HTH. Best wishes Harald
Followup to newsgroup only please.

"(E-Mail Removed)" <(E-Mail Removed)> wrote in message
news:01a201c393af$4883e870$(E-Mail Removed)...
> In my VBA I needed to get some data from another Excel
> file located in the same directory with current host excel
> file.How could I got the current file's path ,something
> the same as "../" in UNIX?
> Thanks!



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
set path, change path - path grayed out John Smith Windows XP Help 1 12th Feb 2005 02:56 PM
set path, change path - path grayed out John Smith Windows XP General 1 12th Feb 2005 02:56 PM
How to get directory path of current rquest? Olav Tollefsen Microsoft ASP .NET 1 29th Oct 2004 06:41 PM
How to get Full Path of current directory ? (ASP.net) PHaroZ Microsoft ASP .NET 3 26th Nov 2003 01:00 PM
Get path/directory of current mdb John Microsoft Access VBA Modules 3 18th Nov 2003 09:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:36 PM.