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,491
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
 
I have a UserForm in my Personal.xlsb that I access from the QAT.
The UserForm at the moment has just about 40 Command Buttons for various operations.
A few of these just print information onto an empty sheet.
One I use constantly is where the current file will be saved, as a back-up, onto a few external drives. (learned the hard way)
I export it to save as soon as I make changes or add to it. I then import it on another computer so I'll have it there also.
 
Upvote 0

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
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?
Stick to what you are happier with, but I would have thought there is a little less work in using the Personal workbook?. The add-in will come in handy for me if I ever have to give one of my workbook to someone, so thanks for the thread. :)
 
Upvote 0
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?
I guess there are pros and cons to each. Since I have never created an Add-In, I am not 100% sure, but here is what I glean about each (if any statement is incorrect, please feel free to correct).

Add-Ins seem to be a bit more portable (as you saw, moving from one computer to another), and can easily be shared with others. I think you also have the code locked down, so users cannot mess with it.

Using a Personal.xlsb file seems to be a little easier to create, and easier to add or amend your code to.
 
Upvote 0

Forum statistics

Threads
1,213,567
Messages
6,114,342
Members
448,570
Latest member
rik81h

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