The great function InStr I use a lot has a small confusing part.
Which string comes first? and which second?
The SearchIN? or the SearchFor?
I got confused, so this post is merely to remind me how to use it.
Function VBInstr(SearchFor, SearchIn, Optional StartSearch = 1, Optional SearchCompare)
VBInstr = InStr(StartSearch , SearchIn, SearchFor , SearchCompare )
' I always forget which string comes first, the searchin, or the searchfor?
' So, I thought I got it here online for my references
InStr([start,] SearchIn, SearchFor [,compare] )
InStr([start,] BigString, SmallString [,compare] )
InStr([start,] string1, string2 [,compare] )
string1 Required. String expression being searched.
string2 Required. String expression sought.
SearchFor, SearchIn, Optional StartSearch = 1, Optional SearchCompare
Views 2459 Downloads 818