Cannot run the macro: The macro may not be available in this workbook or all macros may be disabled

hi

  1. I have enabled all macro in my Excel.
  2. My Excel workbook ends with “.xls”
  3. Tried running the macro via “Execute Macro” inside an Excel Application scope
  4. Tried running the macro via “Invoke VBA” inside an Excel Application scope

But for both 3) & 4), I get the error message that

“The macro may not be available in this workbook or all macros may be disabled”

Hi @Anonymous2

Do you call the Macro name correct?

If it correct, please check Marco in your excel files.
as far as i know, maybe some Marco in your excel file has a problem,
Please try to test it by deleting Marco that you don’t want to execute
and using the Execute Marco activities to run it again.

Hi

Thank you for the reply. The macro names are correct. The macro also work fine when I run them myself on Excel.
The issue is Uipath just can’t run the Macro. I noted that “Execute Macro” works fine with simple macro but not with long, complex macros.

Is there a solution to this? Or is there somethings that I need to avoid in the Macro code?
Thank you.

Hi

I found the solution. We mustn’t re-name the module name in Excel. We need to keep it as Module1, Module2, …

Thanks