Moving Macro to one file

smartpat19

Board Regular
Joined
Sep 3, 2014
Messages
114
I have built a macro that pulls data into a master sheet.


Can i have this macro sit in one excel file on a network and create a second macro that would be in the data sheets and when clicked would open the network sheet and run the macro on the data sheet?

Benefit being I can update the macro in one sheet without having to update all 80 worksheets.


Currently this is how I set my tabs. would i need to change this?

Additionally, what would the macro in the data sheets look like?
Really just need a starting point and I can figure out the details :)

Code:
Set wks = Worksheets("Cash Flow Template")Set income = Worksheets("Monthly NOI")
Set Summary = Worksheets("Proforma Summary")

Thank you,
Patrick
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
A Macro is just a procedure that tells the computer which actions to take and in which order to take them. It does the same thing that a user would do manually, only a whole lot faster. How the procedure is written determines where it can be run from effectively. So your question is too broad to give a detailed answer to, but yes, if properly written, you could do what you asked. But the post does not contain enough detail to even begin trying to offer a solution that you can readily use.
 
Upvote 0
Maybe this will help, I am looking for a macro that would:

1. Open outside excel file (master)
2. run macro in master file on source workbook

Details: The master file wouldn't change file location, opens master file in read only,

details of master file macro:
This macro has the following sheet references, would I need to adjust them?

Code:
[COLOR=#333333]Set wks = Worksheets("Cash Flow Template")Set income = Worksheets("Monthly NOI")
[/COLOR][COLOR=#333333]Set Summary = Worksheets("Proforma Summary")[/COLOR]
 
Upvote 0
That does not make the water any less muddy for me. If you have a macro that produces what you want and just want to run it from a different workbook, the state which workbook it is currently in, which code module it resides in, where you would like to move it to (Workbook with path) and post the existing code. Then, perhaps someone can work with it. But I doubt you will get any takers on the information posted so far.
 
Upvote 0

Forum statistics

Threads
1,224,737
Messages
6,180,665
Members
452,992
Latest member
TokugawaIesuma

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