CitectVBA Programming Reference > Understanding CitectVBA Language Basics > Option Statements > Option Compare statement

Option Compare statement

The Option Comparestatement determines how strings are compared within a CitectVBA file, and like other Optionstatements 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 Comparestatement to specify the default case-sensitivity behavior for CitectVBA functions when making string comparisons.

The Option Comparestatement in CitectVBA has two settings:

See Also


Option Statements