560 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owls only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Using Excel Add-Ins to Share VBA Code
Part three of a four-part series of blogs
If you've written a killer function, you'll want to be able to share it between workbooks. The best way to do this is using an add-in.
All of the instructions that follow are for Excel 2010 - the steps for Excel 2007 are nearly identical, and for Excel 2003 are similar.
To create an add-in, first create the code in VBA, then save the file with the right name, type and location.
You can create an add-in just like for any other workbook:
Here we've created the 3 functions show in the previous part of this blog, and put them in a module which we've called UsefulCode.
You should now give your VBA project a sensible name, so it's easier to find:
Right-click on the project in the code editor and choose to show its properties, as here.
Type in a sensible name and description for the project, then select OK:
Here we've called the project WiseOwlCode.
Now that you've created the functions and procedures that you want to share (note that by default they'll all be Public, not Private), you can create your add-in. Firstly, switch to Excel and choose to save your file:
Choose this option from the File menu.
You can now choose to save your file as an add-in:
Follow the numbered steps below.
To do this:
You'll make life much easier for yourself if you stick to the folder offered, as this will be where Excel looks for add-ins by default.
Now that you've created and saved your add-in, it's time to use its functions within other workbooks!
|Parts of this blog|
25 Aytoun Street