I am trying to use the Execute Macro activity to run a macro from my Personal Macro Workbook (PERSONAL.XLSB), but I encounter an exception, which I’ve included below.
My input field for Execute Macro is as follows, where “JobsheetExport” is the macro name:
Here’s part of the error message (if the full message helps, I can post that too):
Message: The range does not exist
Source: Execute macro
Exception Type: ExcelException
UiPath.Excel.ExcelException: The range does not exist —> System.Runtime.InteropServices.COMException: Cannot run the macro ‘C:\Users\Daniel\AppData\Roaming\Microsoft\Excel\XLSTART\PERSONAL.XLSB!JobsheetExport’. The macro may not be available in this workbook or all macros may be disabled.
Put single quotes before C and ! in file path. The file path should be “‘C:\Users\Daniel\AppData\Roaming\Microsoft\Excel\XLSTART\PERSONAL.XLSB’!JobsheetExport”
I’m trying to run an Excel macro in format XLSB too, with two variable arguments. I couldn’t find the way, to send these arguments to the macro, despite one argument is well sent.
Another issue I have, is that the macro execution is run twice, even we the macro contains just a message.
I am trying to run a macro from UiPath. However, I am getting an error saying ’ The range does not exist’. In the excel scope, I have given the workbook name and then within that an execute macro function with the macro name in quotes (“Macro1”). Thanks for your help.