Dynamically Use External Modules

poleary2000

Active Member
Joined
Apr 1, 2002
Messages
354
What I would like to do is to create an add-in to Excel. I have a bunch of things that I do on a regular basis with code. I want to save these in an add-in and attach a menu to it so I can use the pieces of code within Excel.

The problem is, I have a bunch of little pieces of code and I want the add-in to start quickly. I would like to save the modules into their own little files and only use them in the add-in when I call them. Thus reducing load time.

Does anyone have any suggestions on how best to do this?
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Well you could transfer the existing procedures to new Add-Ins using Export/Import. Then in your Master Add-In you could write code to open the required Add-In, run the procedure in it and close it again.
 
Upvote 0
Well, which bit are you stuck on?

1. To open an Add-In

Workbooks.Open Filename:="YourPathYourAddIn.xla"

2. To run a procedure in another workbook:

Run "YourAddin.xla!YourMacro"

3. To close an Add-In

Workbooks("YourAddIn.xla").Close
 
Upvote 0
I find it pretty interesting that we can call external modules on the fly.
And I am planning on using it.

...But...

I am thinking of this moment that will comme eventually where you need to update a certain module that is referenced in many other files and you don't know which ones?
Personnally this is the first road block I see in using this method.

Anybody thought of a way to scan files and look for a reference to this module you are trying to update and avoid user complaints that their excel file is no longer working?
 
Upvote 0

Forum statistics

Threads
1,216,077
Messages
6,128,679
Members
449,463
Latest member
Jojomen56

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