Written by Allen Wyatt (last updated December 25, 2021)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and 2021
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:
Figure 1. The advanced options in the Excel Options dialog box.
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:
Figure 2. The Edit Links dialog box.
Figure 3. The Startup Prompt dialog box..
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:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8390) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and 2021. You can find a version of this tip for the older menu interface of Excel here: Updating Automatically When Opening Under Macro Control.
Dive Deep into Macros! Make Excel do things you thought were impossible, discover techniques you won't find anywhere else, and create powerful automated reports. Bill Jelen and Tracy Syrstad help you instantly visualize information to make it actionable. You’ll find step-by-step instructions, real-world case studies, and 50 workbooks packed with examples and solutions. Check out Microsoft Excel 2019 VBA and Macros today!
You can use the Zoom feature of Excel to magnify what Excel shows of your workbook, but it affects the entire screen. ...
Discover MoreDoes your macro need to know how many windows Excel has open? You can determine it by using the Count property of the ...
Discover MoreWhen processing a worksheet with a macro, it may be helpful to periodically recalculate the worksheet. Wouldn't it be ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
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.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments