Hi,
I have an .xlsx file in Excel application scope. Doing some hot key operations to copy code form notepad to the VBA editor window and to run the code. And I do the Save work book. Save work book failing. Can you please suggest what is going wring. This code used to work before.
Instead of using the classic activities use the modern activities to run the vb code in xlsx file.
Follow the below steps -
→ Insert the Excel Process scope activity and insert the Use excel file activity inside of it.
→ Inside Use excel file activity insert the Invoke VBA Activity.
→ Keep the VB Code in the notepad file and copy the path of the notepad file.
→ Give the path of the notepad file in the Code file path field.
→ Give the Method name in the Entry method name field.
This will work with out opening the editor window and copying the code. The above will work fine.
Excel Application Scope
Send hotkey ALT+F8 to open vba
Type into the vba file name
Click Create
send hot key ctrl + a
send hot key delete
Using hot keys copy from vba file all content and paste in vba editor
send hot key f5 to execute vba
SAVE workbook (erroring)
Copy work book to another workbook
Repeat the above steps for all the vba files.
For the first vba code file, SAVE work book working fine.
From the second time, SAVE workbook erroring.
Do I need to separate Excel Scope to each of the vba files?