Need to capture run time error in Excel macro execution

I have an Excel sheet which has the path of the macro file, macro name. The bot should pick up the file and run the macro by taking the macro name and the bot should capture any run-time error if any error exists in the macro.

i have made macro to run as soon as the file opens by giving file path in windows search button

Please help me to solve this

Hi @LathaBasavaraju,

Is this the same issue as in this topic - How to take a screenshot? ?

yes, it’s the same

@LathaBasavaraju As the issue is the same, I will remove this topic.
It would be great if you can describe your issue in 1 topic in future. In order to prevent creation of duplicates.