Calling Macro in another workbook

Gregorys05

Board Regular
Joined
Sep 24, 2008
Messages
217
When calling a macro in another workbook via a active x command button I am getting a;

Run time error 1004 - cannot run the macro "macroname". The macro may not be available in this workbook or all macros may be disabled.

Here is what i am trying to run.
Workbook = AWD BI - Amendment Turnaround & Error Type Analysis v14.xls
Sheet Macro is on = DEALAMEND MI Summary
Macro name = Refresh


Code:
Application.Run "'AWD BI - Amendment Turnaround & Error Type Analysis v14.xls'!DEALAMEND MI Summary.Refresh"

Any ideas what i am doing wrong.

Thanks
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Use the Worksheet's CodeName, eg:

Rich (BB code):
Application.Run "'AWD BI - Amendment Turnaround & Error Type Analysis v14.xls'!Sheet1.Refresh"
 
Upvote 0

Forum statistics

Threads
1,224,548
Messages
6,179,451
Members
452,915
Latest member
hannnahheileen

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