InStrAfter – An InStr variant that returns the index after the matching string

' search for a string starting at a given index' and return the index of the character that follows' the searched string (case insensitive search)Function InstrAfter(Source As String, Search As String, _    ByVal index As Long) As Long    InstrAfter = InStr(index, Source, Search, vbTextCompare)    If InstrAfter Then        InstrAfter = InstrAfter + Len(Search)    End IfEnd Function

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: