That you have to change in the excel @Arun_Pondhe
Open the excel file and change it
File → Options → Trust Center → Trust Center Setttings → Macro Settings → Trust Access to the VBA Project object model.
@HareeshMR After changes still not working showing Macro error
Can you post the recent error you are getting @Arun_Pondhe
are you sure u have “Main” function in newFile.txt?
Can you try enabling the macros in the excel @Arun_Pondhe
Seems the macros are disabled and check the function name in the code. if possible post the screenshot of the code or add the code file
newFile.zip (2.6 KB)
I want workflow for these code file if possible please tell me any idea
Please change “Main” to “Button1_Click” and try to run it again
The error occurred because you call not exist macro (you marco name is Button1_Click)
As @Natapong mentioned in the above post, the function name is invalid. please try changing that
and why don’t you save the file with .vb extension instead of txt.
Thank you for your advice , i mistake about it.
I’m using .txt because Invoke VBA activity can call .txt file and run code normally
yeah not at all a problem with .txt file also @Natapong
I just reminded that, storing the file with .vb extension will help us to know it is a macro file. thats it . It will work with both the files.
Thank you and glad to meet you online
Could you please share the details in [FileocVB.vbs] files.
Please try running the macro in the excel manually and check if it is working fine @Arun_Pondhe
@HareeshMR manually working fine but using activity it’s not work
Let me know if your file is enabled with macro?
Go to trusted settings and enable all macros in excel sheet.
Check Trust access to VBA process settings.
In Active x enable all settings