/ Published in: Visual Basic
Left of separator
Expand |
Embed | Plain Text
Option Explicit Option Compare Text ' UDF Public Function LeftOf(ByVal haystack As String, ByVal needle As String) As String Dim i As Long i = InStr(haystack, needle) If i > 0 Then LeftOf = Left(haystack, i - 1) Else LeftOf = haystack End If End Function
You need to login to post a comment.
