Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Excluding a Specific Add-In at Startup.

Excluding a Specific Add-In at Startup

Written by Allen Wyatt (last updated June 10, 2021)
This tip applies to Excel 2007, 2010, 2013, and 2016


2

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:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

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.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Problems Pasting Large Pictures

If you insert a large picture in your document and your text jumps all around and the picture seems to disappear, don't ...

Discover More

Editing the Custom Spelling Dictionaries

When spell-checking a worksheet, Excel relies on both built-in and custom dictionaries. Here's how to edit the content of ...

Discover More

Displaying a Count of Zeros on the Status Bar

Excel allows you to display the results of several common worksheet functions on the status bar. The available functions ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

Slowing Down Mouse Selection

Ever tried to select a range of cells using the mouse, only to have the cells scroll by so quickly you can't make the ...

Discover More

Dividing the Screen Unevenly between Two Workbooks

When working with multiple workbooks, you'll typically want to resize the workbook windows so you can see the data from ...

Discover More

Closing Excel when Closing the Last Workbook

Have you noticed that when you close the last workbook in Excel, the program window itself often stays open? This ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is two more than 0?

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?


This Site

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.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.