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

Searching for Characters

When using pattern matching in a search, you can specify individual characters or ranges of characters you want matched ...

Discover More

Inserting a Document's Path

You can use the FILENAME field to insert a document's filename and, optionally, the path to that filename. However, if ...

Discover More

Determining the Day of the Year

Need to find out the day of the year for a particular date? It's easy to do if you are using a macro. All you need to do ...

Discover More

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!

More ExcelTips (ribbon)

Problems Pasting Information into a Worksheet

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 More

Changing Your Name

One 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 More

Keyboard Shortcut for Switching between Workbooks

When you use Excel with multiple workbooks open at the same time, you can use the ribbon tools to switch between ...

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 five minus 5?

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.