How to save custom functions and macros to an Add-In
Macros and custom functions are great, they can automate many tedious tasks. To have them available whenever you need them, save user defined functions and macros to a personal add-in.
When you open a new excel spreadsheet, these functions and macros are ready to be used.
How to quickly create an empty Add-in for Excel 2007 and later versions
- Save a blank workbook as a Excel Add-In (*.xlam) in your Add-In folder.
I named it MyAddIn.xlam. - Press with left mouse button on Office button.
- Press with left mouse button on "Excel options" button.
- Press with left mouse button on "Add-Ins" tab.
- Select Excel Add-ins.
- Press with left mouse button on "Go..." button.
- Press with left mouse button on "Browse.." button.
- Select MyAddIn.xlam.
- Press with left mouse button on OK.
- Make sure MyAddIn is enabled in Add-In Manager.
- Press with left mouse button on OK.
Recommended article
Recommended articles
Save links to your favorite macros in a personal tab on the ribbon for easy access and become more productive. […]
Add custom functions to your personal add-in
- Press with left mouse button on "Developer" tab on the ribbon.
- Double press with left mouse button on Myfunctions.xlam in project window.
- Press with left mouse button on "Insert" tab.
- Press with left mouse button on Module.
- Copy and paste custom functions and macros to code window.
How to use custom functions in an Add-In
- Select a cell.
- Type the custom function name in formula bar. Press Enter.
If you don´t know the name of your custom function, continue to step 3. - Press with left mouse button on "Insert Function" button.
- Select category "User Defined".
- Select your custom function.
- Press with left mouse button on OK.
How to use macros in an Add-In
- Press with left mouse button on "Developer" tab.
- Press with left mouse button on Macros button.
- Type the name of your macro.
- Press with left mouse button on "Run" button
Example custom functions and macros
Which macro shortcut keys do you use? (Code for excel and outlook)
Personal.xls (Daily dose of excel)
Recommended blog posts:
Excel Macro Toolbar
Menu for favorite macros in Excel 2007-2010 (for all workbooks)
Making Your Custom Functions Available Anywhere
Add in category
In this post I am going to show how to create a new sheet for each airplane using vba. The […]
Merge Ranges is an add-in for Excel that lets you easily merge multiple ranges into one master sheet. The Master […]
This article demonstrates an array formula that searches two tables on two different sheets and returns multiple results. Sheet1 contains […]
Macro category
Table of contents Save invoice data - VBA Invoice template with dependent drop down lists 1. Save invoice data - […]
This tutorial shows you how to list excel files in a specific folder and create adjacent checkboxes, using VBA. The […]
In this post I am going to show how to create a new sheet for each airplane using vba. The […]
User defined function category
This article demonstrates two ways to calculate the number of times each word appears in a given range of cells. […]
This article demonstrates two formulas that extract distinct values from a filtered Excel Table, one formula for Excel 365 subscribers […]
This article demonstrates a user defined function that lists files in a ggiven folder and subfolders. A user defined function is […]
Excel categories
4 Responses to “How to save custom functions and macros to an Add-In”
Leave a Reply
How to comment
How to add a formula to your comment
<code>Insert your formula here.</code>
Convert less than and larger than signs
Use html character entities instead of less than and larger than signs.
< becomes < and > becomes >
How to add VBA code to your comment
[vb 1="vbnet" language=","]
Put your VBA code here.
[/vb]
How to add a picture to your comment:
Upload picture to postimage.org or imgur
Paste image link to your comment.
spellnumber command
Having lost my macros a number of times using Excel 2010, I have discovered that Personal.xlam is NOT saved on exit even if changes have been made! You must remember to save it manually or lose all your hard work. Does anyone know how to FORCE a save if the file is "dirty"?
[…] can find instructions to do this in many places. A quick search revealed this site which also includes pictures; at step 5 in their “Add custom functions to your personal add-in” […]
I've made very bad experience with your approach and thus ended up with a Workbook with all the macros (I call them services) which includes a test environment for a regression test etc. Whenever I've changed something in this Workbook I 'Setup/Renee' the Addin. This is not just saving it as Addin but is a much more complex process. It has to be considered that the Addin is open and referenced by other open Workbooks. And last but not least these two instances - which only differ by their extension (xlsb versus xlam) have to be considered when the Workbook is opened.