/ Published in: Visual Basic
Right of last instance
Expand |
Embed | Plain Text
Option Explicit Option Compare Text ' UDF ' Right of last instance Public Function RightOfLast(ByVal haystack As String, ByVal needle As String) As String Dim i As Long i = InStrRev(haystack, needle) If i > 0 Then RightOfLast = Mid(haystack, i + Len(needle)) Else RightOfLast = "" End If End Function
You need to login to post a comment.
