Kindly help me figure out what is the reason why is it not working in other users the macro when running in UiPath. Upon trying it on my side, it is working properly.
May I know what error they are getting
@Lainyvi_Santoc
I think you have given the path of the Macro Excel file wrong. Provide the proper file path in the code.
Hope it helps!!
Welcome to the community
- Where is the macro?
- What error are you getting?
- Is the macro placed in any user realted folders? if so then other users cannot access it as it is in your local
- Is the path to macro given properly
cheers
I already enable the file for macro but the user is still getting this error
hi, this is the error.
I have an activity where the user will update the macro file. And then after that, BOT will copy it to a folder-- a shared folder and then copy it to local drive. the reason Iāve done that is to avoid corruption of the file.
I have provided the proper path, the error is that the macro cannot be executed.
Hi
Error indicates that the macro that you are trying to run is not available in the workbook or that macros are disabled on the machine where you are running the script.
It could be like
- The macro is in a different workbook than the one that you are trying to run the script in.
- The macro was deleted from the workbook.
- The macro was disabled in the workbook.
But the most common cause of this issue is related to macro security settings in Excel.
Macros may be disabled or set to a high security level on the machine where the automation is failing
Make sure this setting is enabled in others machine
Open an Empty excel or any excel file ā Goto File-> Option ->Goto Trust Center ā Trust Center Settings ā Go to āMacro Settingsā and choose a lower security level or enable macros.
Save it and restart excel
If this is done already but still if facing issue then ensure that the workbook (XLSB file) being accessed by your automation contains the macro named āDistribution file - Runallā as mentioned in the error message
Ensure that the XLSB file is in the expected location or in the expected sheet of the excel
Check this out
Check on these aspects and let us know for further clarification
Cheers @Lainyvi_Santoc
- Macro runs on xls or xlsx files if you are using invoke vba by saving macro in text file or vba file but not on xlsb
- Are you saving the macro in xlsb file itslef?
- Can you please tell where the macro is?
you need to run macro in some other file and open the xlsb from macro and perform the operationā¦this is one of the wayā¦
Not sure on what file you are trying to run the macro?
From the screenshot can see you are expecting the macro to be saved in xlsb file and module name is runall and macro is also runall
Can you please show if macro is present ā¦
Also did you happen to enable the trust center settings?
Hope this clears
Cheers
hello Anil, thank you for the quick answer. Yes, the Excel is in XLSB. Numerous times I tried it on my side and works all the time. But right now, when one of the users runs it, then she will get an like what I have sent earlier.
Below is the activity:
Did we check in these aspects @Lainyvi_Santoc
- Is the same file you are using used by the end user as well?
- Are the macro settings enabled for end user? ā¦valudate with the settings you have on your machineā¦
- Manually are you able to run the macro on the end user session? Did you test it?
Cheers
thanks everyone! its now resolved.