Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

Option Compare

  • Last UpdatedJul 18, 2023
  • 1 minute read

Determines how strings are compared within a VBA module. The optional Option Compare statement if used, must be placed at the top of the VBA file along with any other Option declarations.

If an Option Compare statement is not included, the default text comparison method is Binary.

Syntax

Option Compare {Binary | Text}

InStr | StrComp

Example

Option Compare Binary
Dim vntResult as Variant
vntResult = StrComp("VBA rules!", "vba Rules!")
' returns 1 (strings unequal)

Example

Option Compare Text
Dim vntResult as Variant
vntResult = StrComp("VBA rules!", "vba Rules!")
' returns 0 (strings equal)

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in