ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Active Folder Name (https://www.excelbanter.com/excel-programming/430558-active-folder-name.html)

sgl

Active Folder Name
 

Hi all,
How do you find the name of the "active folder" not the whole CurDir path
just the folder name which can be used to validate if user is in the correct
folder.

many thanks/sgl

Jacob Skaria

Active Folder Name
 

Try

Msgbox Mid(curdir,InstrRev(CurDir,"\")+1)

If this post helps click Yes
---------------
Jacob Skaria


"sgl" wrote:

Hi all,
How do you find the name of the "active folder" not the whole CurDir path
just the folder name which can be used to validate if user is in the correct
folder.

many thanks/sgl


sgl

Active Folder Name
 

Absolutely brilliant
thank you vm/sgl

"Jacob Skaria" wrote:

Try

Msgbox Mid(curdir,InstrRev(CurDir,"\")+1)

If this post helps click Yes
---------------
Jacob Skaria


"sgl" wrote:

Hi all,
How do you find the name of the "active folder" not the whole CurDir path
just the folder name which can be used to validate if user is in the correct
folder.

many thanks/sgl



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

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