1004 Error calling Macro from another Workbook---only on some

codeliftsleep

Board Regular
Joined
Apr 14, 2017
Messages
103
Hey all,

having a very irritating error that I can't get resolved...I am opening and calling the same Function name from 6 workbooks. 4 of them it works perfecly fine. The other 2, I get the dreaded "Error 1004 The macro cannot be ran or macros are disabled". Everything is right. The filename is found, it opens the file, the Sub is there to run, but it throws the error.

The irritating part is that 4 workbooks work with no issues, calling the same macro name. Only two aren't working properly. I checked and there are no compiler issues. It legit will just not run the macro.

How can I resolve this?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
I would temporarily rename one of the file that don't open, copy across a working file into that location and make that the failing name and try again, this should prove that the file can be opened in which case it will be a file issue and not code
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,265
Members
452,627
Latest member
KitkatToby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top