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:
Create the modules you want to save in the add-in.
Select the Debug/Compile VBAProject option in the Visual Basic Editor to compile the project, to ensure that no syntax errors exist.
Switch to the Excel window.
Select File/Save As (in Excel 2007, click the Office button and select Save As/Other Formats).
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.
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.