VBA runtime 1004 error:

joecom88

New Member
Joined
Nov 13, 2014
Messages
3
Hi all: I am getting:

vba runtime error 1004 cannot run the macro. the macro may not be available in this workbook or all the macros may be disabled.

when I attempt to run through a module that runs another module within the xlsm. I can run personal.xlsb modules successfully. I've tried about a dozen fixes to no avail.

Application.Run "Portfolio_Analytics_Macros_Pro.xlsm!pgSUMMARY"

is the specific code in question though I use Application.Run many times throughout.

Stumped on this and any help would be greatly appreciated.....
Thanks
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
.
.

If the macro pgSUMMARY is in a module within the same workbook as the calling macro, then Application.Run "pgSUMMARY" should work fine.

Check that:
(1) pgSUMMARY is not declared as a Private Sub;
(2) the module containing pgSUMMARY is does not start with Option Private Module; and
(3) pgSUMMARY doesn't require any arguments (i.e. parameters within the parentheses).

If it fails any of the above conditions, then that will cause an error.
 
Upvote 0
Hi: thanks for the reply. I verified all the items below and it still doesn't work.
If it helps, the modules live in one worksheet and fills in another worksheet template.
There is an older version that works fine. The macro sheet and template both live on the network, though running from C drive doesn't fix it.

Any other thoughts it might be? Could it be something in the environment?

Thanks, Joe

.
.

If the macro pgSUMMARY is in a module within the same workbook as the calling macro, then Application.Run "pgSUMMARY" should work fine.

Check that:
(1) pgSUMMARY is not declared as a Private Sub;
(2) the module containing pgSUMMARY is does not start with Option Private Module; and
(3) pgSUMMARY doesn't require any arguments (i.e. parameters within the parentheses).

If it fails any of the above conditions, then that will cause an error.
 
Upvote 0

Forum statistics

Threads
1,216,116
Messages
6,128,930
Members
449,479
Latest member
nana abanyin

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