current folder

When I use CurrentProject.Path, I get something like this: C:\ABC\123

I just want to return 123.  How would I do this?  Thanks.
Sasha42Asked:
Who is Participating?
 
Rgonzo1971Connect With a Mentor Commented:
Hi,

a = Mid(YourString, InStrRev(YourString, "\") + 1)

Open in new window


Regards
0
 
mbizupCommented:
s = CurrentProject.Path
msgbox mid(s, instrrev(s,"\") +1)

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.