How to best manage multiple workbooks with common VBA code routines?

bnj1776

Board Regular
Joined
Aug 20, 2014
Messages
67
Hello,

I'm currently up to six workbooks (add more soon) that work together and share a number of functions.

My question is how can I best manage updates and distribute changes to those functions to each of the workbooks?

Currently I update the "master workbook" and then manually copy to all the others, or at least that is what I'm trying to do.

Or is there some magic way to call a function that exists in another workbook?

Before I reinvent the wheel sorting this out, are there any suggestions for how to manage this or tools to use?

Thank you.
Brian
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
I'd use an add-in. Then all you need to do is update the add-in when required - one location for code, one change each time.
 
Upvote 0
I'd use an add-in. Then all you need to do is update the add-in when required - one location for code, one change each time.

Awesome. Now I just have to learn how to do that. :) Any suggestions for someone new to Add-In's?
 
Upvote 0
Essentially you move the code into a new workbook and then save that as an add-in. How complicated it gets after that depends on how your workbooks use the addin. If it's just formulas in cells, you simply alter the formulas to use the add-in version. If there are macros involved it becomes more complicated as you need to set up a menu system.
 
Upvote 0
LOL. Nothing simple here!

I'm creating unique estimates from a number of workbooks.

Estimator (main program workbook)
Data (data file workbook)
Customers workbook
Template (required worksheets for each new estimate)
Module X (required worksheets for just Module X)
Module Y (required worksheets for just Module Y)
Module Z (required worksheets for just Module Z)
etc... (we are looking at nearly 30 different modules)

The Data file is the root of the new estimate.
I rename it and copy in the customer info and template to begin with.
Then the modules are added as needed allowing for as many copies as needed as well (I rename every worksheet & table and update the formulas with the VBA import process)

When done the Estimate workbook has no links to any other workbook, it is self contained.

At least that is the goal, I'm having an issue with one link that shows it is updated during the process but remains anyways. Grrrr.

------

I have no idea how an Add-In works at this point, so I'm not even sure how it could fit into what I'm doing above.
Sounds like it is certainly worth looking into though.

Any crazy good Add-In info sites out there that you would recommend?

Thank you
 
Upvote 0
If the goal is for the workbooks to be completely self-contained, the add-in approach won't work anyway, unless your final estimate workbook doesn't use any code functions.
 
Upvote 0
The estimate workbook will still be able to pull in and update modules as needed using VBA.

And later we will generate pdf files for contracts, purchase orders, etc. based on the information in the workbook.
 
Upvote 0
When you say modules, are you referring to code modules or something else?
 
Upvote 0
So what are the "functions" that you update and distribute between all the workbooks, exactly?
 
Upvote 0

Forum statistics

Threads
1,214,942
Messages
6,122,367
Members
449,080
Latest member
Armadillos

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