Hello @kana612 Modify your macro to avoid ActiveWorkbook or ActiveSheet and always reference the workbook explicitly, then run it inside an Excel Application Scope in UiPath.
Also try using Invoke VBA or Execute Macros Activity to execute the macro.
@kana612 some of the code we are able to achieve by using activate sheet for the excel manipulations. please try using activate sheet methods to make sure that sheet is active in unattended mode.
Okay so follow these steps Open Excel then go to File then Options then Trust Center then Trust Center Settings then Macro Settings:
Enable Trust access to the VBA project object model
Check the Enable all macro (temporarily, for testing)