467,151 Members | 904 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,151 developers. It's quick & easy.

case insensitive InStr

I understand that InStr is case senstive. Is there an alternate function that is case insensitive?
Nov 21 '06 #1
  • viewed: 12880
Share:
4 Replies
100+
I understand that InStr is case senstive. Is there an alternate function that is case insensitive?
hi

no there is not, but you may shortcut this by using UCase() or LCase()
Nov 21 '06 #2
Thanks, lcase worked
Nov 21 '06 #3
Expert 8TB
Thanks, lcase worked
Actually, according to the documentation (VB6) you can use Instr and simply tell it not to be case-sensitive. This might be more efficient than converting the text to upper- or lower-case all the time.

InStr([start, ]string1, string2[, compare])

vbBinaryCompare 0 Performs a binary comparison.
vbTextCompare 1 Performs a textual comparison
...
In English-U.S., binary comparisons are case sensitive; text comparisons are not.
Nov 21 '06 #4
100+
Actually, according to the documentation (VB6) you can use Instr and simply tell it not to be case-sensitive. This might be more efficient than converting the text to upper- or lower-case all the time.
learned again something today
Nov 21 '06 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

32 posts views Thread by Elliot Temple | last post: by
12 posts views Thread by Relaxin | last post: by
14 posts views Thread by Christian Sell | last post: by
13 posts views Thread by Tom Anderson | last post: by
1 post views Thread by benhoefer@gmail.com | last post: by
7 posts views Thread by Adrian | last post: by
reply views Thread by J. Cliff Dyer | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.