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: Updating Automatically when Opening Under Macro Control.

Updating Automatically When Opening Under Macro Control

Written by Allen Wyatt (last updated October 29, 2022)
This tip applies to Excel 97, 2000, 2002, and 2003


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. Choose Options from the Tools menu. Excel displays the Options dialog box.
  2. Make sure the Edit tab is selected.
  3. Clear the Ask To Update Automatic Links check box.
  4. Click on OK.

With the check box cleared, Excel no longer asks and all links are updated automatically.

If you are using Excel 2002 or Excel 2003 and you want an option that doesn't affect all workbooks, you can follow these steps:

  1. Open the workbook that contains the links.
  2. Choose Links from the Edit menu. Excel displays the Links dialog box.
  3. Click the Startup Prompt button. Excel displays the Startup Prompt dialog box.
  4. Choose the third option, Don't Display the Alert and Update Links.
  5. Click on OK to dismiss the Startup Prompt dialog box.
  6. Click on Close to dismiss the Links dialog box.
  7. 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 (2899) 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: 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

Linking Word Documents

Want to add one document to another document? You can do it by adding links, described in this tip.

Discover More

Appending to a Non-Excel Text File

Does your macro need to add information to the end of a text file? This is called appending and is done using the ...

Discover More

Converting to Hexadecimal

Excel allows you to easily convert values from decimal to other numbering systems, such as hexadecimal. This tip explains ...

Discover More

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!

More ExcelTips (menu)

Saving Changes when Closing

If your macro closes workbooks, you'll want to make sure that it will save any changes you made to the workbook. Here's ...

Discover More

Generating Unique, Sequential Names

Do you need to create a number of words or phrases where you only alter a few letters in each one? If the alterations ...

Discover More

Copying Worksheet Code Automatically

When creating a workbook to be used by others, you may want any worksheets they add to the workbook to contain some ...

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

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

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.