This is a brief aid on how to create a simple add-in into all new Workbook Excel files.
It may happen that you use a Module with a specific VBA macro in it that you wish you could include it as a default macro into all new Excel files you create. This article will guide you through the steps you will need to take to make it happen. Then you will be able to apply the same steps to your own modules or macros.
Open a new excel file. Press Alt+F11
to open the Visual Basic Editor, and then click Insert
and select Module
as shown below. Then copy and paste this code:
Function GetFormula(x As Range) As String
GetFormula = x.Formula
You need to save this workbook as: Excel Add-In
. Save the file with name as: GetFormula
. Make certain to save the file under your Documents in a place you will remember.
Now it's time to add the new add-in GetFormula
to all new Excel files where you will Include it as a default add-in.
Open a new Excel file, and go into File
. In the Manage
field select Excel Add-ins
and then, click Go...
Search for you GetFormula
Excel add ins file you created at Step 2. Follow the steps 1 through 3 shown in the picture below, and then click OK
. Make sure to check the GetFormula
before you click OK.
Close Excel without
saving the file and then re-open the program. Press Alt+F11
to open the Visual Basic Editor, and see if your module is showing your version of GetFormula
You have now made GetFormula
be a default module to all Excel files.
You can always remove it if you don't want your add-in anymore. Just go back to step 4
and uncheck GetFormula
. This will remove it from the default Add-ins.
You can now make your own Excel add-ins!!! Enjoy.