2.1: Automatically generate VBA code from Process Runner

2.1: Automatically generate VBA code from Process Runner

This option will work only for external excel files.

Select the external excel file in which you want to create the macro and click on 'Generate Template' option stationed at Tools group in Home menu.

gen-temp-1-vba

Select 'Insert “Run with Process Runner” button to worksheet' option in Generate Excel Template screen.

PRTHCMDVBA-Ch--2-1 (3)

Note: The 'Insert sample data from recording' and 'Insert "Run with Process Runner" button to worksheet' options are available only if 'Use External Excel File' option is selected as an Excel source.  

It won’t allow you to proceed until you have turned on “Trust Access to VBA Project”. You can click on the “Click Here” link in it on how to do it.

**Make sure to close Process Runner instance and then enable Trust Access in Excel. If not, there will be an active excel instance and thus your settings would not be saved.

PRTHCMDVBA-Ch--2-1 (4)

Once Process Runner is restarted and trust access is enabled you can now turn on that option.

ch-2

Click on 'OK'.

You can see below Process Runner will insert an extra VBA macro button “Run with Process Runner” in the excel file.

PRTHCMDVBA-Ch--2-1 (7)

You can look at the code by going to Visual Basic Editor.

PRTHCMDVBA-Ch--2-1 (8)

Following is the code that will be automatically included in for button (Run with Process Runner) with macro.

PRTHCMDVBA-Ch--2-1 (9)

The above code snippet will enable you to run Process Runner through VBA-Excel.

Next

Step-by-Step on manually generating VBA Code for Process Runner