To totally unlock this section you need to Log-in
Login
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 in 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
Save a blank workbook as a Excel Add-In (*.xlam) in your Add-In folder. I named it MyAddIn.xlam.
- Click Office button.
- Click "Excel options" button.
- Click "Add-Ins" tab.
- Select Excel Add-ins.
- Click "Go..." button.
- Click "Browse.." button.
- Select MyAddIn.xlam.
- Click OK.
- Make sure MyAddIn is enabled in Add-In Manager.
- Click OK.
Add custom functions to your personal add-in
- Click "Developer" tab on the ribbon.
- Double click on Myfunctions.xlam in project window.
- Click "Insert" tab.
- Click Module.
Copy and paste custom functions and macros to code window.
How to use custom functions in an Add-In
Select a cell, then type the custom function name in formula bar. Press Enter. If you donĀ“t know the name of your custom function, continue to next step. Click "Insert Function" button.
Select category "User Defined".
Select your custom function and then click OK.
How to use macros in an Add-In
- Click "Developer" tab.
- Click Macros button.
- Type the name of your macro.
Note
The subs included in the .xlam o .xla will NOT display if:
- Option Private Module is specified in the module.
- The code is not in a regular/standard module.
- If the subs are private as in: Private Sub NameOfSub.
- If the subs have arguments as in: Sub NameOfSub(ByRef lngStuff as Long).