Skip to main content

Hello Community,

I needed to run a specific Macro based on users parameter while running the Business report.

IF param_value = 1 then
execute Macro1
else
execute Macro2

automatically, during or just after the execution of BA report.

Is it possible to achieve? If yes, then please help me with the steps required.

 

BR Tool Information​​​​

Thanks in advance.

Rohit.

What do you mean by BA report?

How does the user input this value?  Is it one of the report values?

If a PDF is created you could create a custom action on the PDF_REPORT_CREATED system event.


What do you mean by BA report?

How does the user input this value?  Is it one of the report values?

If a PDF is created you could create a custom action on the PDF_REPORT_CREATED system event.

@mwilson I meant the “Business report” -
 

User can input values in this dialog window.

However, I solved my requirement using alternate solution, but I will keep this thread open to see if this is also possible or not.

 

Thanks.


I tried the below 2 options -

Private Sub Workbook_open()

Sub Auto_Open()

But these 2 options run just after workbook gets opened, and BR tool populates the workbook after this “open” event of excel. So at the time these subprocedures run, the workbook doesn’t contain any data.

 

Is there a BR tool provided event? like “on populate”, which can trigger macros after BR tool finishes populating the data. I didn’t find such. It will be nice to have feature if BR tool also can fire some of its events. For example, “on data populate” will be handy.

 

Thanks.


I tried to add my macro code on WindowActivate event. It seems to be working fine. The macro executes after the data gets populated.

In the macro, I can check the parameter value then execute different block of code based on the parameter value.


Reply