Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. 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: Updating Automatically When Opening Under Macro Control.

Updating Automatically when Opening Under Macro Control

Written by Allen Wyatt (last updated December 25, 2021)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


Graham wrote about a glitch he was having with his Excel automation efforts. It seems that a scheduled macro—which would run just fine—would open another workbook in order to update it. He could not get the macro to open the workbook without it displaying a notice asking if the automatic links in the workbook should be opened. The question halted the macro while it waited for Graham's response, and he was looking for a way for the links to be updated automatically, without the bothersome notice.

There are several ways this problem can be approached. First, you can configure Excel so that it doesn't ask the question. This option affects all workbooks opened on the system:

  1. Display the Excel Options dialog box. (In Excel 2007 click the Office button and then click Excel Options. In Excel 2010 and later versions display the File tab of the ribbon and then click Options.)
  2. Click Advanced at the left of the dialog box and scroll down to the General section. (See Figure 1.)
  3. Figure 1. The advanced options in the Excel Options dialog box.

  4. Clear the Ask To Update Automatic Links check box.
  5. Click on OK.

With the check box cleared, Excel no longer asks and all links are updated automatically. If you want an approach that doesn't affect all workbooks, you can follow these steps:

  1. Open the workbook that contains the links.
  2. Display the Data tab of the ribbon.
  3. Click the Edit Links tool in the Queries & Connections group (Connections group in earlier versions of Excel). Excel displays the Edit Links dialog box. (See Figure 2.)
  4. Figure 2. The Edit Links dialog box.

  5. Click the Startup Prompt button. Excel displays the Startup Prompt dialog box. (See Figure 3.)
  6. Figure 3. The Startup Prompt dialog box..

  7. Choose the third option, Don't Display the Alert and Update Links.
  8. Click on OK to dismiss the Startup Prompt dialog box.
  9. Click on Close to dismiss the Edit Links dialog box.
  10. Save your workbook.

Now the workbook can be opened without Excel asking about updates. This, of course, affects just this workbook, and it affects it regardless of how it is opened. In other words, it will affect how the workbook is opened by the macro as well as when it is opened by a user.

Perhaps the best approach is to simply make a small change in your macro—the one that opens the workbook containing links. There is a good chance that the code to open the workbook looks something like this:

Workbooks.Open FileName:="MyWorkbook.xls"

If this is the case, change the line to this:

Workbooks.Open FileName:="MyWorkbook.xls", UpdateLinks:=3

This UpdateLinks property is optional, but without it the "Do you want to update links" dialog box is displayed. If you include the property with the setting shown, then Excel will update both remote and external references in the workbook as it is opened.

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 (8390) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Updating Automatically When Opening Under Macro Control.

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

Entering Large Time Values

If you need to input humongous times into a worksheet, you may run into a problem if you need to enter times greater than ...

Discover More

Controlling Formula Reference Jumping

When you select a cell, you typically do so to see what the cell contains to to make changes to the cell. How Excel ...

Discover More

Finding a Worksheet to Unhide among Many Hidden Sheets

Trying to track down a single worksheet among many hidden worksheets can be a challenge. This tip examines a few ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Self-Deleting Macros

Macros are very powerful, but you may not want them to always be available to a user. Here are some ways you can limit ...

Discover More

Ctrl+Break Won't Work to Stop a Macro

When you need to stop a macro while it is running, you normally press Ctrl+Break. What are you to do if the keypress ...

Discover More

Out of Memory Errors when Accessing the VBA Editor

It can be frustrating when you get error messages doing something that you previously did with no errors. If you get an ...

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 7?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


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.