How to create a custom add-in code module that can be used by all workbooks?

JenniferMurphy

Well-known Member
Joined
Jul 23, 2011
Messages
2,532
Office Version
  1. 365
Platform
  1. Windows
On my old XP machine, I had several add-in code modules that I created and populated with UDFs that I wrote. I created those modules a long time ago and I cannot remember how I did it.

Now I want to create similar add-ins on my new Win 10 machine, but I cannot figure out how. In the VBA editor (IDE?), if I click Insert | Module, it creates a workbook code module. I want a separate add-in code module that can be used by all workbooks.

Can someone explain what should be obvious?

Thanks
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Upvote 0
Thanks. Based on that, it looks like I have to create an XLAM file for the code module and then add that as an Add-In. Right?
I actually have never created an Add-In myself, but from what I glean from the article, that is what it sounds like to me.

I just did a search on my old XP machine and found an XLAM file for each of the Add-Ins I use there. Would I be better off just copying those files over to Win 10 and then adding them as Add-Ins there?
It can't hurt to try, and see if that works. If it does, it should save you the work of having to re-create them.
 
Upvote 0
I actually have never created an Add-In myself,
Really? I couldn't live without them. I have dozens, maybe hundreds by now, of little utility UDFs that make my Excel life so much easier. Some of them just convert a long, complicated, error-prone expression into a simple UDF call. Others do involved calculations.

but from what I glean from the article, that is what it sounds like to me.
Yep, it works.

It can't hurt to try, and see if that works. If it does, it should save you the work of having to re-create them.
That also works. Now I have all of my UDFs working (so far) in Excel 365.

Thanks for your help. (y) (y) (y)
 
Upvote 0
You are welcome.

As welshgasman mentions, I keep all mine in a Personal.xlsb file, mostly because I do not need to distribute them to others (just for my personal use).
If you do have need to do that, an Add-In is a good way to go.
 
Upvote 0
@JenniferMurphy
Do you ever use your Personal.xlsb file?
Nope, until you mentioned it just now, I didn't even know about it.

I just did a little reading. It appears that the main difference is that add-in modules can be sent to others or put on a shared disk.

I have several add-in modules. I have one main one, but a few others for specific tasks. And I have a "Test" add-in where I put new code while I am working out all the kinks. That way only code that has been tested and debugged are in the main add-in module. Can I do something similar with .xlsb modules?

Let me know if there are other differences or reasons why I should switch.

Thanks
 
Upvote 0
As welshgasman mentions, I keep all mine in a Personal.xlsb file, mostly because I do not need to distribute them to others (just for my personal use).
If you do have need to do that, an Add-In is a good way to go.
I do not need to give my code to anyone else. I use add-in module because that's all I knew about. Is there any other reason why I should switch?
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,901
Members
449,097
Latest member
dbomb1414

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