The Option
Compare
statement determines how strings are compared within
a CitectVBA file, and like other Option
statements in CitectVBA, should be
declared at the beginning of your CitectVBA code files.
When strings are compared using CitectVBA
functions such as StrComp()
or
InStr()
, CitectVBA determines
whether they contain equivalent characters and how they differ if
they do not match.
Note: When comparing strings, CitectVBA compares the ANSI values of each character in the strings. For example, the character capital 'A' has the ANSI value of 65, and the character lowercase 'a' has the ANSI value of 97. For a listing of ANSI character values, see ASCII/ANSI Character Code Listings.
You can use the Option
Compare
statement to specify the default case-sensitivity
behavior for CitectVBA functions when making string
comparisons.
The Option
Compare
statement in CitectVBA has two settings:
See Also