Discussion:
"Best" way to determine Option Compare?
(too old to reply)
Auric__
2012-07-04 22:25:37 UTC
Permalink
Is there any built-in method to determine what Option Compare method is in
effect? Right now I'm just doing this (which ignores vbDatabaseCompare, which
I never use):

If "A" = "a" Then
cmp = vbTextCompare
Else
cmp = vbBinaryCompare
End If
--
Nationality doesn't determine beauty.
Deanna Earley
2012-07-05 08:02:05 UTC
Permalink
Post by Auric__
Is there any built-in method to determine what Option Compare method is in
effect? Right now I'm just doing this (which ignores vbDatabaseCompare, which
If "A" = "a" Then
cmp = vbTextCompare
Else
cmp = vbBinaryCompare
End If
Out of interest why does the code need to know?
If it requires a specific compare, use StrComp() and pass an explicit mode.
--
Deanna Earley (***@icode.co.uk)
i-Catcher Development Team
http://www.icode.co.uk/icatcher/

iCode Systems

(Replies direct to my email address will be ignored. Please reply to the
group.)
Auric__
2012-07-06 03:07:59 UTC
Permalink
Post by Deanna Earley
Post by Auric__
Is there any built-in method to determine what Option Compare method is
in effect? Right now I'm just doing this (which ignores
If "A" = "a" Then
cmp = vbTextCompare
Else
cmp = vbBinaryCompare
End If
Out of interest why does the code need to know?
Replicating (and extending) various string functions: currently InStr and
Split, with more in the near future. Mostly as a mental exercise.
Post by Deanna Earley
If it requires a specific compare, use StrComp() and pass an explicit mode.
...which is the exact opposite of what I want. :-)
--
Why am I back here?
HOLY SHIT WHAT'S GOING ON
Oh, hello again.
Loading...