Centralised Macro Control

Swift4Play

New Member
Joined
Dec 1, 2009
Messages
11
I have a collection of workbooks (208 in total), each is unquie in respect to the data they hold but all are identical in respect to the layout and macros contained within.

i was wondering if it is possible to have a workbook (say called SourceCode) which had one complete set of the macros, then every other workbook could just use something like

Code:
Application.Run "SourceCode.xls!Macro1"
(but with passing variables)

if possible this would reduce each workbooks size, ensure that each workbook was using identical code and save having to update each workbook should changes need to be made (you'd just update the 'SourceCode').

Can anyone tell me if this is even possible and if so the pros/cons

Kind Regards
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Thanks Alpha,

i noticed you stated that if the 'SourceCode' workbook was closed I could use the Application.Run command but the code you directed me states the 'SourceCode' workbook must be open. Is this the case and it has to be open? Only i was hoping to find a solution that wouldn't involve opening it up.

Kind Regards
 
Upvote 0

Forum statistics

Threads
1,224,612
Messages
6,179,890
Members
452,948
Latest member
Dupuhini

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