Saving Functions in Add-Ins

To share a custom function, you must first decide whether the user should be allowed to view the function code. Excel offers add-ins that allow you to hide the code of VBA functions. To create your own add-in, do the following:

  1. Create the modules you want to save in the add-in.

  2. Select the Debug/Compile VBAProject option in the Visual Basic Editor to compile the project, to ensure that no syntax errors exist.

  3. Switch to the Excel window.

  4. Select File/Save As (in Excel 2007, click the Office button and select Save As/Other Formats).

  5. In all versions of Excel except Excel 2007, select the Excel Add-In (*.xlam) file format (in versions of Excel before Excel 2007, the extension appears as *.xla), and enter a name.

  6. Switch back to ...

Get Microsoft® Excel® 2010 Formulas & Functions Inside Out now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.