Article ID: 167277 - Last Review: November 8, 2000 - Revision: 1.0 XL97: Referenced Workbooks and Add-Ins Are Automatically OpenedThis article was previously published under Q167277 On This PageSUMMARY
In Microsoft Excel 97, when you create a reference from a workbook to
another workbook or to an add-in, the referenced workbook or add-in is
automatically opened by Microsoft Excel 97. This is different from behavior
in earlier versions of Microsoft Excel. In earlier versions, the referenced
workbook or add-in is not automatically opened.
This article explains the problems that you may encounter when you reference other workbooks and add-ins in Microsoft Excel 97. MORE INFORMATION
In Microsoft Excel 97, you can create a reference from one workbook to
another workbook or to an add-in by doing the following:
Errors Opening Referenced Workbooks or Add-Ins with Visual Basic MacrosMicrosoft provides examples of Visual Basic for Applications procedures for illustration only, without warranty either expressed or implied, including, but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The Visual Basic procedures in this article are provided 'as is' and Microsoft does not guarantee that they can be used in all situations. While Microsoft support professionals can help explain the functionality of a particular macro, they will not modify these examples to provide added functionality, nor will they help you construct macros to meet your specific needs. If you have limited programming experience, you may want to consult one of the Microsoft Solution Providers. Solution Providers offer a wide range of fee-based services, including creating custom macros. For more information about Microsoft Solution Providers, call Microsoft Customer Information Service at (800) 426-9400.If you attempt to use a Visual Basic for Applications macro to open a workbook or add-in that is already referenced by another open workbook, you may receive the following error message:
Run-time error '1004': This workbook is currently referenced by another workbook and cannot be closed. Errors Closing Referenced Workbooks or Add-InsIn Microsoft Excel 97, you cannot close a referenced workbook or add-in if the referencing workbook is open. If you attempt to do so, you receive one of the following error messages:
This workbook is currently referenced by another workbook and cannot
be closed.
-or-
Run-time error '1004': This workbook is currently referenced by another workbook and cannot be closed. 159794
(http://support.microsoft.com/kb/159794/EN-US/
)
XL97: Cannot Programmatically Close Referenced Workbook
Errors When Multiple Users Reference the Same Workbook or Add-InBecause Microsoft Excel 97 automatically opens referenced workbooks and add-ins, you may experience problems if multiple users reference the same copy of a workbook or an add-in. This problem may occur if you create a reference to a workbook or to an add-in stored on a network server, or if you open a workbook that contains this kind of reference.The first user who creates the reference does not receive an error message. However, all users who subsequently create a reference or open a workbook that contains this kind of reference may receive the following error message:
'<Filename>' is being modified by
<First user's name> Open as Read-Only, or choose Notify to be alerted when it is available.
Can't add a reference to the specified file.
If multiple users share the same copy of an add-in, you may want to give each user a copy of the add-in, and then ask each user change the reference to refer to each copy of the add-in. By doing this, you can prevent this problem from occurring. | Article Translations
|

Back to the top
