23.6.2 Use Microsoft® Visual Basic as a client application

A Microsoft® Visual Basic® tool can be used as a client application using Origin's automation server support.

As an example, the tool displayed below was created to perform the simple task of passing random data to Origin.

VB Client 01.png
VB Client 02.png

In the example images above, the Visual Basic tool is the client application. This tool simply generates some random numeric data and some texts then places them in a sheet in an Origin workbook specified by the user. If the workbook does not exist, a new workbook is created.

The tool gives you the choice to either replace data in the sheet, or append to existing data. You can even specify the number of rows and columns of the sheet that should receive the data.

The Origin application can be toggled between visible and hidden states. The Origin project can also be saved when closing the Visual Basic application.

To try this example in Origin, run the SendTextDataToWks.exe located in this zip file(For Origin 2017 SR0 and other earlier versions, please download this zip file instead), under the\COM Server and Client\VB\SendTextDataToWks subfolder.