anjasing
(Anjali)
January 30, 2024, 11:40am
1
I am facing this issue for long!
File is saved in .xlsx format.
No macros or VBA script is inside the excel.
I am using all the macros/formulae saved in text file and then using Excel application scope and inside it Invoke VBA.
Any help would be highly appreciated.
mkankatala
(Mahesh Kankatala)
January 30, 2024, 11:43am
2
Hi @anjasing
Try enabling the Macros in the .xlsx file.
Step by step process to enable macro -
→ Click on File option in ribbon bar
→ Click on Options
→ Excel options window opens in that select the Trust center and hit on the Trust center settings
→ Click on Macro Settings
→ Select the Enable VBA Macros and Enable the option Enable Excel 4.0 macros when VBA Macros are enabled
→ Enable the option Trust access to the VBA Project Object model
This issue usually occurs when the file path mentioned in the excel application is not a macro enable excel file path
–either we need to enable the macro settings in that file path
or
–we need to mention the excel file path without a macro enabled one like simply a xlsx or xls file
–now inside the scope use a Invoke VBA activity where we can pass the macro script as string or keep the macro script in a text file and use read text file activity and get the output with a variable of type stri…
Hope it helps!!
1 Like
anjasing
(Anjali)
January 30, 2024, 11:48am
3
Hi @mkankatala ,
It’s a macro enabled file.
anjasing
(Anjali)
January 30, 2024, 11:58am
4
HI @mkankatala ,
I’ve already followed this. But I can’t enable 4th option as it’s dangerous and without enabling also, previously it worked perfectly fine.
It gave issue when I added something in text file which contain VBA script
mkankatala
(Mahesh Kankatala)
January 30, 2024, 11:59am
5
If possible could you share the vb code then I’ll check is there any error in the code @anjasing
anjasing
(Anjali)
January 30, 2024, 4:16pm
6
I’ve saved again the content of VBA script in new text document and renamed it. Not sure about the reason, but this worked.
mkankatala
(Mahesh Kankatala)
January 30, 2024, 4:17pm
7
That’s why I asked you about to share the workflow and code. @anjasing
Anyway it’s working.
Happy Automation!!
1 Like
system
(system)
Closed
February 2, 2024, 4:18pm
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.