The information in this article applies to:
SYMPTOMSIn Microsoft Excel, when you use a Visual Basic, Applications Edition, procedure to create an Office Binder OLE Automation object, and you edit a Microsoft Excel worksheet object in the Binder, you may receive the following error message:
CAUSEThis behavior occurs when you edit a Microsoft Excel worksheet object in a Binder using OLE Automation if you attempt to access a single sheet (such as a worksheet) or an item on a single sheet (such as a cell value) from outside the Application object without using the Parent object. This behavior occurs because the Microsoft Excel object is a worksheet, even though the section in the Binder is a workbook that you can add sheets to and so on. For example, if you use the following command in a Visual Basic procedure to add a worksheet to section 1 (a Microsoft Excel workbook) in the Binder "MyBinder," you receive the above error message:
If you use the following command to enter the value "test" in cell A1 on
the first worksheet in section 1 (a Microsoft Excel workbook) in the Binder
"MyBinder," you also receive the above error message:
RESOLUTION
To work around this behavior, use the Parent object to access a Microsoft
Excel workbook object, and then use the property or method of the Worksheet
object as in the following examples:
The following command enters the value "test" in cell A1 on the first
worksheet in section 1 (a Microsoft Excel workbook) in the Binder
"MyBinder":
MORE INFORMATIONFor additional information, please see the following article(s) in the Microsoft Knowledge Base: Q114225 XL5: OLE Automation Error Using Quit Method with GetObject REFERENCESFor more information about "Parent Property," click the Index tab in Help and type: pare Additional query words:
Keywords : kbcode kbinterop |
Last Reviewed: October 20, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |