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?
 

Some videos you may like

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

mole999

Moderator
Joined
Oct 23, 2004
Messages
10,111
Office Version
2019, 2016, 2013
Platform
Windows
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
 

Watch MrExcel Video

Forum statistics

Threads
1,090,549
Messages
5,415,205
Members
403,572
Latest member
twinlock

This Week's Hot Topics

Top