VBA Programming Reference
- Last UpdatedJul 18, 2023
- 2 minute read
VBA is a Visual Basic for Applications (VBA) and VBScript-compatible Basic scripting language. Plant SCADA has embedded support for VBA.
Note: VBA is not supported on a 64-bit process, such as an alarm server operating in Extended Memory mode. If a call to VBA code occurs from a 64-bit process, an error code will be returned, a hardware alarm will be raised and the Cicode thread will stop.
VBA has the following features:
-
VBA code is multithreaded and fully scheduled within the Plant SCADA Kernel.
-
VBA uses the same well proven engine that Cicode uses and can be used wherever Cicode is used.
-
VBA has a small footprint of under 400K.
-
VBA code is directly callable from Plant SCADA Command and Expression fields.
-
VBA code is callable from Cicode and vice versa.
-
VBA code provides native support for ActiveX objects, Plant SCADA Variable Tags and Alarm Tags.
-
VBA makes ActiveX object manipulating easier. It allows direct interaction with the object models from 3rd party applications such as Word, Excel, etc.
Note: You may notice slight differences between VBA and VBA in other applications; this is normal as each application has a different object model.
The Cicode Editor has been upgraded to fully support VBA. Supported features include:
-
Integrated Cicode and VBA compiler
-
Integrated Cicode and VBA source code editor
-
Integrated Cicode and VBA debugger
This section contains information on the VBA programming language and describes the following:
-
ASCII/ANSI Character Code Listings
Note: For information regarding methods you can use to extend Plant SCADA that do not require VBA, see the topic Extensibility.