Issue while running macro

Shweta

Active Member
Hi,
Can anyone please help with below issue:

I am running a macro in excel but there is a pop up appearing in which there is a button "done", once the macro has run.

I created a separate object to handle that pop up, but issue is bot is not moving further from Run macro stage so I am not able to execute that separate object.

Please help.

Thanks.
 

sahil_raina_91

Active Member
Hi,
Can anyone please help with below issue:

I am running a macro in excel but there is a pop up appearing in which there is a button "done", once the macro has run.

I created a separate object to handle that pop up, but issue is bot is not moving further from Run macro stage so I am not able to execute that separate object.

Please help.

Thanks.

Run macro action will not return the control back to Blue Prism until the popup is handled. Thus, you will not be able to move ahead.

Create a new action in your Excel VBO and use that to run macro.

Create a Handle Input for this code
Use this code :

Dim thread as New Thread(
Sub()
GetInstance(Handle).Run(Macro_Name)
End Sub
)
thread.Start()
 

dbzdbgt

New Member
Run macro action will not return the control back to Blue Prism until the popup is handled. Thus, you will not be able to move ahead.

Create a new action in your Excel VBO and use that to run macro.

Create a Handle Input for this code
Use this code :

Dim thread as New Thread(
Sub()
GetInstance(Handle).Run(Macro_Name)
End Sub
)
thread.Start()
How would you check if the macro ended if it's on a new thread ? suppose right after the macro, blueprism has to save the file, an exception saying the application is busy (if the macro takes time) will be shown ?!
 

sahil_raina_91

Active Member
How would you check if the macro ended if it's on a new thread ? suppose right after the macro, blueprism has to save the file, an exception saying the application is busy (if the macro takes time) will be shown ?!

As far as I know, there is no certain way to check if the macro has ended, if running via thread.
The action will move forward, after running the macro.
Also, I think subsequent actions in Excel might fail too, if the macro is still running (I can't advocate that)

You can either update the macro to write a comment/flash a message box (and check for that to exist via separate object or Excel VBO itself)
Or you can wait for a specific time before continuing with next action of Excel VBO
 
Last edited:

dbzdbgt

New Member
As far as I know, there is no certain way to check if the macro has ended, if running via thread.
The action will move forward, after running the macro.
Also, I think subsequent actions in Excel might fail too, if the macro is still running (I can't advocate that)

You can either update the macro to write a comment/flash a message box (and check for that to exist via separate object or Excel VBO itself)
Or you can wait for a specific time before continuing with next action of Excel VBO
Thank you very much. That was helpful
 

to_mas_re

New Member
Run macro action will not return the control back to Blue Prism until the popup is handled. Thus, you will not be able to move ahead.

Create a new action in your Excel VBO and use that to run macro.

Create a Handle Input for this code
Use this code :

Dim thread as New Thread(
Sub()
GetInstance(Handle).Run(Macro_Name)
End Sub
)
thread.Start()

Hi, I tried this and my BP crash down after stepping over this action. I have created new action in MS Excel VBO with code stage as stated in your reply. It manages to step over the code stage, but right after that BP stops working and Windows pop-up window open trying to identify the problem. I have to kill BP and start it over.

Any idea what is going on?

Thanks
 

sahil_raina_91

Active Member
Hi, I tried this and my BP crash down after stepping over this action. I have created new action in MS Excel VBO with code stage as stated in your reply. It manages to step over the code stage, but right after that BP stops working and Windows pop-up window open trying to identify the problem. I have to kill BP and start it over.

Any idea what is going on?

Thanks

Please post some screenshots of the code stage (input, code).
I can't think of a scenario where this may crash BP
 

to_mas_re

New Member
Please post some screenshots of the code stage (input, code).
I can't think of a scenario where this may crash BP

I already deleted the action and tried something different, sorry. But I don't think the problem was in inputs - maybe something unrelated that was triggered accidentally by the this. I'll experiment with this later on because I'm curious :)
 

Kamal

New Member
I already deleted the action and tried something different, sorry. But I don't think the problem was in inputs - maybe something unrelated that was triggered accidentally by the this. I'll experiment with this later on because I'm curious :)
Did you get any solution ?

Could you please demonstrate ?
 

to_mas_re

New Member
Did you get any solution ?

Could you please demonstrate ?
Hi, if my memory serves me well, my solution was to create new macro, copy-paste the old one and remove the message part. The mentioned app crashing was just a one time thing and it has never occurred since.
 
Top