I writed a macro to get the status of the checkbox.But I encountered a little problem when running it on blueprism.
My macro name PERSONAL.XLSB!CheckBox.I can manually execute it successfully.enter image description here But I got an error reminder when I run the Run Macro via blueprism.enter image description here error message:The code stage could not be executed because an exception was thrown by the code stage. The macro '' PERSONAL.XLSB! 'CheckBox' cannot be executed. Macros may not be available in this workbook, or all macros may be disabled.
The methodology that Blue Prism uses when launching Excel does not automatically open the current user's PERSONAL.XLSB
file.
There are three options to rectify this:
Open the current user's personal macro-enabled workbook using the MS Excel VBO
's Open
action, pointing the File
attribute to the location of PERSONAL.XLSB
. In environments running Windows 7 or later, this is usually C:\Users\<user name>\AppData\Local\Microsoft\Excel\XLStart
(source). You should then be able to reference the macros as you have been with the Run Macro
action within the MS Excel VBO
.
Copy the pertinent macros to the file in question before processing it with Blue Prism, and invoke them simply by name using the Run Macro
action of the MS Excel VBO
.
Add the macro code to a modified version of the MS Excel VBO
, refactoring per Blue Prism's official guidance on Extending the MS Excel VBO.