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

Seeing All Open Workbook Names

Ever want to see a list of all the workbooks that are open? If you open more than nine, Excel only displays the first ...

Discover More

Pasting without Updating References

Do you need to paste formulas without updating the references in whatever you are pasting? You can accomplish this, ...

Discover More

Converting Tables to Text

Need to convert all the tables in your document into plain text? This tip provides a macro that can make quick work of a ...

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)

Showing RGB Colors in a Cell

Excel allows you to specify the RGB (red, green, and blue) value for any color used in a cell. Here's a quick way to see ...

Discover More

Finding Other Instances of Excel in a Macro

When processing information using a macro, you may need to know if there are any other instances of Excel running on a ...

Discover More

Filling a Range of Cells with Values

When writing a macro, you may want to fill a range of cells with different values. The easiest way to do this is to use ...

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