Function LSEnds( strSource As String, strEnding As String ) As Integer If Len( strSource ) = 0 Or ( Len( strSource ) < Len( strEnding ) ) Then LSEnds = 0 Exit Function End If If Len( strEnding ) = 0 Then LSEnds = 1 Exit Function End If If ( Lcase$( Right$( strSource , Len( strEnding ) ) ) = Lcase$( strEnding ) ) Then LSEnds = 1 Else LSEnds = 0 End If End Function