Function GetFileNameFromPath(ByVal sPath As String) As String GetFileNameFromPath = Right$(sPath, Len(sPath) - InStrRev(sPath, "\")) End Function ' MsgBox GetFileNameFromPath("C:\MesData\Classeur1.xls")