|
Function StripPath(T$) As String
Dim x%, ct% StripPath$ = T$ x% = InStr(T$, "\") Do While x% ct% = x% x% = InStr(ct% + 1, T$, "\") Loop If ct% > 0 Then StripPath$ = Mid$(T$, ct% + 1) End Function 'You would use it as File = StripPath("c:\windows\hello.txt") |