When calling a VI using the ActiveX Call method (vi.Call paramNames, paramValues), LabVIEW exchanges data only through controls and indicators assigned to the connector pane.
- Open the LabVIEW VI Front Panel.
- Locate the connector pane in the upper-right corner of the Front Panel window.
- Right-click the connector pane and select Patterns to choose a connector pattern with enough terminals for your inputs and outputs.
- Assign each input control and output indicator to a connector pane terminal by first clicking an unassigned (blank) terminal and then clicking the corresponding control or indicator.
- Verify that each terminal changes color according to its assigned data type.
- Save the VI.
For additional details and screenshots, refer to the Build the Connector Pane section of: Create and Configure a LabVIEW SubVI
Part 2: Configure VBA Parameter Arrays
The first parameter required by the Call() method is paramNames, which is an array containing the names of the LabVIEW Front Panel controls and indicators used as input and output parameters. The second parameter is paramValues, which is an array that contains the input values passed to the VI and stores the values returned by the output parameters. The elements in paramValues must correspond to the same order as the parameter names specified in paramNames.
Important considerations:
- Parameter names must exactly match the connector pane control and indicator labels.
- String values must be enclosed in quotation marks.
- A LabVIEW cluster is represented as an array of Variants in Visual Basic.
Example:
Part 3: Create the LabVIEW Object and VI Reference
Create a LabVIEW ActiveX object using the CreateObject() function. Then create a variable containing the path to the VI you want to execute. Use the GetVIReference() method to load the VI into memory.
Example:

Part 4: Execute the VI
Use the OpenFrontPanel() method to display the VI Front Panel during execution, then use the Call() method to update the control values specified in the paramValues array and execute the VI. After execution, close the Front Panel if it is no longer needed.
Example:

Part 5: Retrieve the outputs generated by the VI
After the VI finishes running, use the GetControlValue() method to retrieve the output values from the VI. If the output is an array, you can use a VBA For loop to write each element to the Excel worksheet.
Example:
