1 2 Function GetFilenameFromPath(ByVal strPath As String) As String 3 ' Returns the rightmost characters of a string upto but not including the rightmost '\' 4 ' e.g. 'c:\winnt\win.ini' returns 'win.ini' 5 6 If Right$(strPath, 1) <> "\" And Len(strPath) > 0 Then 7 GetFilenameFromPath = GetFilenameFromPath(Left$(strPath, Len(strPath) - 1)) + Right$(strPath, 1) 8 End If 9 End Function
You need to create an account or log in to post comments to this site.