Written by Allen Wyatt (last updated June 10, 2021)
This tip applies to Excel 2007, 2010, 2013, and 2016
Peter asked if there is a way to specify, at Excel startup, that a particular add-in should not be loaded. The add-in he has in mind takes a lot of time to load, and he doesn't need it all the time. Disabling the add-in would help start Excel quicker for those instances when it wasn't needed.
Unfortunately, there is little that can be done to disable add-ins at start-up because no particular workbook is already open. (The add-ins are loaded before any workbooks.) There are a couple of things you could try, however.
The first thing is that you could create your own add-in that does nothing more than ask if the large add-in should be loaded or not. Depending on the user's response, the add-in could then be loaded by using the following line of code:
AddIns("Big Add-in").Installed = True
Of course, you'll need to replace "Big Add-in" with the name of the actual add-in to be loaded. If the user doesn't want the add-in loaded, just skip the line of code. In the Close event for your little add-in you could then add a line like the following that unloads the big add-in:
AddIns("Big Add-in").Installed = False
In this way, the add-in is added only if the user says it is OK to add, and then always unloaded at the end of your Excel session.
Another approach is to never load the large add-in, but put a routine in your Personal.xls file that gives the user a chance to load the add-in. The following could be added to the Workbook_Open event in Personal.xls:
Private Sub Workbook_Open() With Application .OnKey "{TAB}", "InstallMyAddIn" .OnTime (Now + TimeValue("0:00:05")), "DisableTABProc" End With End Sub
The purpose of this macro is to give the user a period of time—in this case five seconds—to press the Tab key so that the large add-in is loaded. The .OnKey method runs the installation routine, if Tab is pressed, and the .OnTime routine starts a timer that runs the disable routine once the five seconds is elapsed. Notice that this macro calls two routines; these can go in a regular module for Personal.xls.
Sub InstallMyAddIn() AddIns("Big Add-in").Installed = True DisableTABProc End Sub
Sub DisableTABProc() Application.OnKey "{TAB}", "" End Sub
Of course, you'll need to add some code for the Workbook_Close event of Personal.xls, in this case to unload the add-in:
Private Sub Workbook_Close() AddIns("Big Add-in").Installed = False End Sub
If you prefer to not use macros, then you can always just move the big add-in from it's directory location or rename the add-in prior to starting Excel. If Excel cannot locate the add-in, it continues to load without loading it.
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12005) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel here: Excluding a Specific Add-In at Startup.
Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!
What do you do if pasting information into a worksheet brings Excel to its knees? This tip looks at just a few ideas you ...
Discover MoreOne of the many pieces of information that Excel keeps track of is your name. If you want to change your name for Excel's ...
Discover MoreWhen you use Excel with multiple workbooks open at the same time, you can use the ribbon tools to switch between ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2021-12-15 01:45:02
Philip
@David, not sure why Allen proposed it, but I do this to make sure that my own ribbon is cleared of add-in items with each Excel shut-down, so that the ribbon can build again next time (with potentially updated / modified ribbon items).
2021-06-10 10:29:21
David Bonin
I don't understand why the code needs to unload the optional add-in with a Workbook_Close() event.
Any explanation?
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2023 Sharon Parq Associates, Inc.
Comments