I am going mad here trying to work out the InStr, InStrRev, Len, Mid, Right, Left VBA functions!!! Can you help end my struggles please……!?
I have a foldername = "c:\TEST\tempfoldera\" (example)
And using one/mix of the above functions I want to retrieve everything AFTER the 2nd “\” from the RIGHT HAND end of the string, so:
NewString = “Tempfoldera\”
I need to use the \ as obviously the foldernames could be longer and shorter so the 2nd \ from the right is in my case always a fixed reference point.
Fingers crossed!
I have a foldername = "c:\TEST\tempfoldera\" (example)
And using one/mix of the above functions I want to retrieve everything AFTER the 2nd “\” from the RIGHT HAND end of the string, so:
NewString = “Tempfoldera\”
I need to use the \ as obviously the foldernames could be longer and shorter so the 2nd \ from the right is in my case always a fixed reference point.
Fingers crossed!