Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Excluding a Specific Add-In at Startup.
Written by Allen Wyatt (last updated April 28, 2018)
This tip applies to Excel 97, 2000, 2002, and 2003
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 (2383) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Excluding a Specific Add-In at Startup.
Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!
Once you've created your custom add-in, you need to know how you or other people can use it. Here are the simple steps to ...
Discover MoreThe primary way to extend what Excel can do is through the use of add-ins. This tip explains what they are and the ...
Discover MoreAdd-ins are used to extend Excel's capabilities in lots of different ways. If you want to get rid of an add-in ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments