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 FunctionSub Click(Source As Button)
Msgbox StripPath ("c:\test\test\Hello.txt")
End Sub