Using Excel Add-Ins to Share VBA Code
Part one 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.

  1. Sharing Code across Workbooks using Add-Ins (this blog)
  2. Useful Examples of Code to Share
  3. Creating an Add-In
  4. Using Add-In Functions

This blog is part of our Excel VBA online tutorial.  Wise Owl also run excellent classroom-based VBA courses!

Posted by Andy Brown on 05 March 2012 | 2 comments

You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

Sharing Code across Workbooks using Add-Ins

Often you'll create a bit of code so useful that you want it to be available whenever you're using Excel.  By far the best way to do this is to create an add-in.  This blog shows:

  • 3 examples of code that you might want to share between workbooks;
  • How to create an add-in; and
  • How to reference an add-in that you've created in code.

Let's start with why you might want to create an add-in, by looking at 3 examples of useful functions to share.


This blog has 2 comments

Comment added on 06 June 2012 at 05:46 GMT

Hi Andy ,

Thank you for a detailed and clear explanation.

Comment added on 15 June 2012 at 21:09 GMT
This works fine when using the add-in on one computer.  But I'm finding that sometimes Excel revises the add-in function name to include fully-qualified pathname of the add-in file, so then the function will fail on another computer even if it has the add-in installed. Any idea how to prevent this?
Reply from Andy Brown

To be honest, no - I wasn't aware of this.  Try these steps for releasing add-ins - I'd be grateful if you could comment here on your findings.

A full-blown discussion forum is being built for this site, which will allow you once more to add comments and discussion threads.