The information in this article applies to:
SYMPTOMS
In Microsoft Excel, if you use the macro recorder to record a Visual
Basic macro, and you choose the Open button in the Links dialog box
to open a linked document, the OpenLinks method is recorded with an
incorrect ReadOnly argument if the link is an object linking and
embedding (OLE) link.
CAUSEWhen you record a Visual Basic macro, where you use the Open button in the Links dialog box to open an OLE link, the OpenLinks method is recorded with a ReadOnly argument value of 2. For example, if you use the macro recorder to open a linked Microsoft Word document, the recorded macro contains the following
command:
This value is incorrect, because the ReadOnly argument should have a
value of True or False (Boolean value). However, the recorded macro
runs correctly, because the recorded argument is accepted as the type
argument. The value 2, used with the type argument, indicates an OLE
type link (xlOLELinks).
The following is the command that should be recorded when you open the linked Microsoft Word document, using the
Open button in the Links dialog box (although it has the same
behavior as the incorrect code above):
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATION
You can use the OpenLinks Method in a Visual Basic macro to open a
file that contains information that is linked to your Microsoft Excel
worksheet. The file may be another worksheet, or a document in
another application, such as a Microsoft Word document.
REFERENCESFor more information about the OpenLinks Method, choose the Search button in the Visual Basic Reference and type: OpenLinks Method Additional query words: 1.00 5.00a 5.00c 7.00a
Keywords : |
Last Reviewed: October 5, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |