Here is the code
Function LeftStr(OrigStr, LeftOf ) As String Dim Pos As Integer Dim OrigStrLen As Integer Pos = Instr( Lcase(OrigStr), Lcase(LeftOf) ) OrigStrLen = Len(OrigStr) If pos>0 Then LeftStr = Left( OrigStr, (Pos-1)) Else LeftStr = OrigStr End If End Function
No comments:
Post a Comment