Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure. However, they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
The Update Remote References calculation setting determines whether Excel updates formulas that include references to external data
sources, such as Microsoft Word for Windows documents or Microsoft Access
databases.
Note Excel workbooks and documents are not
external data sources.
When you open a workbook, the Update Remote References setting is set
according to the following table.
Version of Excel | Condition | Update Remote References check box |
---|
Excel 2000 | The workbook is linked to external data.
You click No when you receive the following prompt:
"The workbook you opened contains automatic links to information in another workbook. Do you want to update this workbook with changes made to the other workbook?" | Cleared |
Excel 2000 | The workbook is linked to external data.
You click Yes when you receive the following prompt:
"The workbook you opened contains automatic links to information in another workbook. Do you want to update this workbook with changes made to the other workbook?" | Selected |
Excel 2002 | The workbook is linked to external data.
You click Don't Update when you receive the following prompt:
"This workbook contains links to other data sources. If you update the links, Excel attempts to retrieve the latest data. If you don't update, Excel uses the previous information." | Cleared |
Excel 2002 | The workbook is linked to external data.
You click Update when you receive the following prompt:
"This workbook contains links to other data sources. If you update the links, Excel attempts to retrieve the latest data. If you don't update, Excel uses the previous information." | Selected |
Excel 2003 | The workbook is linked to external data.
You select Don't Update when you receive the following prompt:
"This workbook contains links to other data sources. If you update the links, Excel will attempt to retrieve the latest data. If you don't update the links, Excel will use the previous information." | Cleared |
Excel 2003 | The workbook is linked to external data.
You click Update when you receive the following prompt:
"This workbook contains links to other data sources. If you update the links, Excel will attempt to retrieve the latest data. If you don't update the links, Excel will use the previous information."
| Selected |
To clear the Update Remote References setting in the active workbook, follow these steps:
- On the Tools menu, click Options or Preferences.
- Click the Calculation tab.
- Click to clear the Update Remote References check box.
- Click OK.
Sample Visual Basic procedure
The following Visual Basic code example assumes that you have a file that is called
TEST.XLS that is located in the C:\EXCEL directory. The example opens the
TEST.XLS file and then clears (turns off) the Update Remote References
check box. As the Sub procedure opens the file, it also prevents
Excel from updating any of the workbook's external or remote references.
Sub Example()
' The zero after updateLinks indicates that neither external nor
' remote references should be updated when the file is opened.
Workbooks.Open fileName:="C:\EXCEL\TEST.XLS", updateLinks:=0
' Turn off the Update Remote References setting for the workbook.
ActiveWorkbook.UpdateRemoteReferences = False
End Sub
Note The
Update Remote References check box is not a universal
setting. When two workbooks are open, one workbook might have its Update Remote
References setting selected whereas the check box is
cleared in the other workbook. However, when you open a workbook, its
Update Remote References
check box will be selected, no matter how it was saved, unless it contains
links to an external data source.