Excel VBA not working Error: "Invoke VBA: Cannot run the macro 'test'. The macro may not be available in this workbook or all macros may be disabled."

I am trying to run macros but even though the macros in previously created processes are working, the ones I creating now are not and giving the error “Invoke VBA: Cannot run the macro ‘test’. The macro may not be available in this workbook or all macros may be disabled.”.You can also see the macro settings in excel below. What could be the reason and how can I solve this? Any help would be appreciated. Thank you!

image

@ebraryilmaz,

This is weird solution but it works.

Copy your existing Code text file code. Open Notepad and paste in new text file and save it to your project.

Now delete the existing text file and do not open the text file from UiPath Studio. I repeat DO NOT OPEN THE VB CODE TEXT FILE FROM STUDIO.

Now try to run. It will run.

If you open the text file from Studio, it will again fail.

Thanks,
Ashok :slight_smile:

@ebraryilmaz

try this, Save your excel file close and reopen Try again some time it will work.

Regards,
Gowtham K

It doesn’t. I am trying for a while now and the result is always the same. but thank you

I couldn’t really understand what you meant, can you explain it in further detail please? How do i save a file to my project? What difference does deleting the existing text file makes? When you say don’t open it from the studio do you mean the server that the UiPath studio located? I am very new to UiPath, sorry for bothering with simple q’s.

Thank you in advance

@ebraryilmaz,

What I mean is do not open from UiPath Studio like we open workflow xaml files. Use a text editor like notepad or something.

When Opened from Studio, something gets changed in that file which makes it faulty.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.