Use InStrRev() to get last occurence of backslash and then Mid(... pos +1):
VB Code:
Private Sub Command1_Click() Dim sText$ sText = "C:\blah\foo\bar.txt" MsgBox Mid(sText, InStrRev(sText, "\") + 1) End Sub
|
Results 1 to 3 of 3
Threaded View
|
Click Here to Expand Forum to Full Width |