Isolate from string

Catalina

Registered User.
Local time
Today, 00:53
Joined
Feb 9, 2005
Messages
471
D:\Databases\MovieDB\Images\MyMovie.jpg

D:\Databases\MovieDB\Test\Images\AnotherMovie.jpg

I'm trying to isolate the part in red. I played with Mid and Instr and still can't get it .
All suggestions how to get it done will be appreciated.

Catalina
 
Code:
Function ParsePart(strVal As String) As String

ParsePart = Mid(strVal, InStr(1, strVal, "\") + 1, InStrRev(strVal, "\") - (InStr(1, strVal, "\")))

End Function
 
Works great DJkarl.

Thanks.

Catalina
 

Users who are viewing this thread

Back
Top Bottom