Run VBA

This topic provides you with information about the VBA Scripts operation.

This page discusses:

See Also
Command
Open URL
Process or Library

Accessing this Operation

This operation can be accessed by clicking VBA Scripts .

Describing this Operation

This operation is designed to run a VBA project to call a specified routine located in a specified module. The operation and the type can be arguments of the macro, thus enabling you to use Know-how Apps Components automation interfaces (used to manage arguments) directly on the operation.

You can reference an external catvba, and specify the module name and the routine to run. The operation itself and the extended object can be optional arguments for the called routine.

Previously, the operation also managed VB scripts. For older models with existing VB scripts, the VB scripts will continue to be able to be executed.

More Information

When VBA Scripts Operation launches a VBA with a non modal tab, ShowModal=false, the next operation can start before the VBScript ends. To by-pass the problem:

  1. Add an OUT integer variable named SYNCVBANonModal to the VBA Scripts Operation.
  2. In the launched routine, store a global reference to the variable.
  3. At the very end of the script (when the tab closes), write something in the variable.

Using this Operation Interface

Name Name attributed to the operation.
Comment Comment attributed to the operation.
VBA: Reference a catvba.
Macro Name Type the name of the resource table entry pointing to the VB or the VBA script that you want to use. Click to open the resource table. Click Edit to launch the VBA editor.
Routine Name Type the name of the routine to launch. By default, if no routine name is specified, the CATMain of the specified module is called. Two arguments can be provided to the called routine: The operation itself (equivalent of this object) and the extended object. With the Script Operation itself as an argument, you can directly access the operation in your macro, allowing you to call Know-how Apps Components automation methods to valuate and retrieve operations parameters.
Defined inputs and parameters Click Add/Modify/Delete to define/modify/delete the inputs and the parameters that retrieved using the exposed automation methods.

Using this Operation

A document is associated with the process that is being developed by the expert user. The expert user wants the end user to access this documentation.