InStr and InStrRev

How to use InStr and InStrRev VB functions
It is silly, I know, but I keep forgetting those.
I did simplified copy of Instr in VBInstr a while back

CodeFunctionName
What is this?

Public

Tested

Imported
Example of usage for both Instr and Instrev

' InstrRev(stringcheck, stringmatch[, start[, compare]])
' InStr([ start ], string1, string2, [ compare ])


? InstrRev("ANmar", "r")
5
? Instr(1,"ANmar1", "r")
5
? InstrRev("ANmar", "a")
4
? InstrRev("ANmar", "A")
1
? InstrRev("ANmar", "A",,vbTextCompare )
4


stringcheck, stringmatch[, start[, compare]]
or
[ start ], string1, string2, [ compare ]

Views 130

Downloads 75

CodeID
DB ID

ANmarAmdeen
633
Attachments
Revisions

v2.0

Monday
December
6
2021