VBA Statements
- Last UpdatedJul 18, 2023
- 1 minute read
A statement in VBA is an unbroken sequence of syntactically correct code script containing at least one VBA keyword instruction. A single statement in VBA is one complete segment of code script that instructs Plant SCADA to do something.
In VBA there is no statement terminator. As in other BASIC programming languages, the end of the line containing the statement is treated as the statement terminator by default.
Most often, a statement consists of a single line of VBA script. However, more than one statement can be placed on one line of VBA script, provided each statement is separated by a colon character (:); for example:
Pump234.AddPoint( 25, 100): Pump234.AddPoint( 0, 75)
This is equivalent in VBA to:
Pump234.AddPoint( 25, 100)
Pump234.AddPoint( 0, 75)
Using complex multi-statement lines of VBA script is not recommended in Plant SCADA. Multithreading should be considered when using more than one statement per line in VBA. For details, see Multithread Considerations with VBA.