VBInstrRev

Similar to VBInstr, but this one does it in reverse, which is instrrev() function, but again, clearer to use since I am stupid and never could use it the first time correct.
The same way we did VBInstr.
Important note, StartSearch is negative as initial value, when you want to use you need to pass +ve numbers not -ve, and the number will be the location of the character you want to start searching from.

CodeFunctionName
What is this?

Public

Tested

Original Work
Function VBInstrRev(SearchFor, SearchIn, Optional StartSearch = -1, Optional SearchCompare = vbTextCompare)
    VBInstrRev = InStrRev(SearchIn, SearchFor, StartSearch, SearchCompare)
End Function
Function VBInstr_Rev(SearchFor, SearchIn, Optional StartSearch = -1, Optional SearchCompare = vbTextCompare)
    VBInstr_Rev = InStrRev(SearchIn, SearchFor, StartSearch, SearchCompare)
End Function

SearchFor, SearchIn, Optional StartSearch = -1, Optional SearchCompare = vbTextCompare

Views 185

Downloads 74

CodeID
DB ID