devxlogo

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

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

devx-admin

Share the Post: