XL97: Macro Doesn't Recognize OLEObject Name Property

Last reviewed: March 13, 1998
Article ID: Q157158
The information in this article applies to:
  • Microsoft Excel 97 for Windows

SYMPTOMS

When you run a macro that refers to an ActiveX OLEObject drawn on the worksheet, you may receive the following error:

   Run-time error: '1004'
   Unable to get the OLEObjects property of the worksheet class

WORKAROUND

When you refer to the object by its name, use the name defined on the worksheet and not the object's name property. To view and edit the name defined on the worksheet, click in the Name box next to the Formula Bar.

If you need to reference an OLEObject in a macro, change the object's name in the following manner:

  1. Click once on the object to select it.

  2. Click in the Name box (next to the Formula Bar) and type the new name.

  3. Press the Enter key on the keyboard.

STATUS

Microsoft 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.


Additional query words: XL97 8.00 OLE
Keywords : kbmacro kbprg xlvbainf
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 13, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.