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

AVEVA™ Plant SCADA

Option Explicit

  • Last UpdatedJul 18, 2023
  • 1 minute read

Forces explicit declaration of all variables.

The optional Option Explicit statement if used, must be placed at the top of the VBA file. This causes a check of variable declarations at compile time. Setting this option is a good way to catch misspelling of variables in your code.

Syntax

Option Explicit

Const | Dim

Example

Option Explicit
' various statements go here
' a compile error will occur with the following line
strMyVar = "This string assignment won't work"
'because strMyVar is not explicitly declared

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