VBA Command Button turn off linking to source workbook

Brad B

New Member
Joined
Jul 27, 2016
Messages
17
I am trying to accomplish something that I would suspect is a common type of problem, but I have been all over the internet and I'm having trouble finding it:

I have a master excel workbook with lots of macros, formulas, and data from many sources which I copy each week to do my planning. I "save as" and add the week and date to the title. The problem is, the command buttons which call the macros are linking to the original / template workbook, so to run them, it must be opened (or excel will automatically open the original when I press the button).

What I need to do is turn off the command button linking to the source / original workbook. I want each button to look in the new workbook at the same modules, run the same functions, etc, but never look in the original / template.

Some specifics:
RM Master.xlsm is the template file I always start with
in Week 1, I save as: RM Master CW1.xlsm
RM Master CW1 has a command button in it which runs sub Export_DS which is stored in module 1.
When I click the command to run Export_DS, the macro it is linking to is actually [RM Master]Export_DS, so it opens RM Master, then runs the macro. How do I make it run the macro in RM Master CW1.xlsm?

I realize I could do this with a personal macro workbook and store the macros in there, but I need this file / process to work for other users on other computers as well. I have a basic understanding of Macros, but I am pretty new to it. I'm open to suggestions on how to best accomplish this.

Thanks for your help!

Brad
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,214,652
Messages
6,120,746
Members
448,989
Latest member
mariah3

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