How to disable Excel Macro in BP
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
22-11-22 03:57 AM
Hi all
I'm trying to write a value to a worksheet cell using the BP Excel VBO object 's "Set Cell Value" action. However, a preset selection menu will popup automatically causing the process hangs.
I tried to disable the Excel Macro from the Options > Trust Center and the it still doesn't work.
Can anyone advise how the Excel macro can be disabled thru BP ?
Many thanks.
Regards,
G. Liu
RPA developer
---------------------
I'm trying to write a value to a worksheet cell using the BP Excel VBO object 's "Set Cell Value" action. However, a preset selection menu will popup automatically causing the process hangs.
I tried to disable the Excel Macro from the Options > Trust Center and the it still doesn't work.
Can anyone advise how the Excel macro can be disabled thru BP ?
Many thanks.
Regards,
G. Liu
RPA developer
---------------------
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
22-11-22 07:10 AM
1. You can change general macro settings in the Trust Center (M365). Choose Disable all macros without notification
2. You can save the file as ".xls " or ".xlsx" before with the Excel VBO "Save Workbook as". To force the format of the file, you can create a new page "Save Workbook as .xlsx" with this code stage:
Dim wb as Object = GetWorkbook(handle,workbookname)
Dim excel as Object = wb.Application
excel.DisplayAlerts = False
wb.SaveAs (filename, 51)
excel.DisplayAlerts = True
newworkbookname = wb.Name
2. You can save the file as ".xls " or ".xlsx" before with the Excel VBO "Save Workbook as". To force the format of the file, you can create a new page "Save Workbook as .xlsx" with this code stage:
Dim wb as Object = GetWorkbook(handle,workbookname)
Dim excel as Object = wb.Application
excel.DisplayAlerts = False
wb.SaveAs (filename, 51)
excel.DisplayAlerts = True
newworkbookname = wb.Name
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
24-11-22 11:59 AM
Hi Ronny
Thanks for the advice. However, I have finally come up with an easier solution.
I created a collection with 2 fields. The 2nd field contains the value to be written to the cell with preset selection menu. I then use the normal write to cell function from BP which starts writing the collection to the cell on the left. And it did write 2 values in 2 cells and no more popup menu !
And of course, I have disabled all the macros from the Excel Trust Center.
Many Thanks.
Thanks for the advice. However, I have finally come up with an easier solution.
I created a collection with 2 fields. The 2nd field contains the value to be written to the cell with preset selection menu. I then use the normal write to cell function from BP which starts writing the collection to the cell on the left. And it did write 2 values in 2 cells and no more popup menu !
And of course, I have disabled all the macros from the Excel Trust Center.
Many Thanks.
