Function GetFilenameFromPath(ByVal strPath AsString)AsString
' Returns the rightmost characters of a string upto but not including the rightmost
'\'' e.g. 'c:\winnt\win.ini' returns 'win.ini'
If Right$(strPath,1)<>"\"And Len(strPath)>0Then GetFilenameFromPath = GetFilenameFromPath(Left$(strPath, Len(strPath)-1))+ Right$(strPath,1)
EndIfEndFunction