2.1 Automatically generate VBA code from Process Runner:

Previous  Top  Next

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 button in toolbar.

clip0025

Select “Insert “Run with Process Runner” button to worksheet” option.

2.1-automatically-generate-vba-code-from-process-runnerb2

 

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 you first exit Process Runner and then enable Trust Access in Excel. If not, there will be an active excel instance because of inbuilt iBook and thus your settings would not be saved.

2.1-automatically-generate-vba-code-from-process-runnerb3

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

2.1-automatically-generate-vba-code-from-process-runnerb4

Click on OK.

 

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

2.1-automatically-generate-vba-code-from-process-runnerb5

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

2.1-automatically-generate-vba-code-from-process-runnerb6

 

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

2.1-automatically-generate-vba-code-from-process-runnerb7

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

See Also

Chapter 1: Executing Process Runner with Command Line Parameters

2.2 Step-by-step on manually generating VBA code for Process Runner

Chapter 3: How to enable Trust Access to VBA Projects