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

What would be the most direct approach to extracting just the last folder
name from "ThisWorkBook.Path".



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default get folder name

Using InStrRev if you're using xl2k or above.

Or looping from the last character to the first looking for the path separator
(\ on windows).

AD108 wrote:

What would be the most direct approach to extracting just the last folder
name from "ThisWorkBook.Path".


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 284
Default get folder name

arrPath = Split(ThisWorkbook.Path, "\")
strParentFldr = arrPath(UBound(arrPath))


Steve



"AD108" wrote in message
...
What would be the most direct approach to extracting just the last folder
name from "ThisWorkBook.Path".





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default get folder name

Thanks,


"Dave Peterson" wrote in message
...
Using InStrRev if you're using xl2k or above.

Or looping from the last character to the first looking for the path

separator
(\ on windows).

AD108 wrote:

What would be the most direct approach to extracting just the last

folder
name from "ThisWorkBook.Path".


--

Dave Peterson



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
how can i change my default working folder to a networked folder? wizard1154 Excel Discussion (Misc queries) 4 April 18th 07 07:29 PM
Check if folder exists, if yes just copy sheet in to folder? Simon Lloyd[_787_] Excel Programming 3 June 19th 06 03:44 PM
How to decide folder-depth or How to select more folders/subfolders (folder-tree) ? Subteam Excel Discussion (Misc queries) 2 May 7th 06 08:14 PM
how can I specific a folder with wildcard criteria and excel will import all the correct files in that folder? Raven Excel Discussion (Misc queries) 1 January 24th 06 03:28 PM
how can I specific a folder with wildcard criteria and excel will import all the correct files in that folder? Raven[_2_] Excel Programming 1 January 24th 06 04:23 AM


All times are GMT +1. The time now is 05:24 PM.

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"