XL98: Run-Time Error 57121 If Macro Uses ControlFormat Object

Last reviewed: February 3, 1998
Article ID: Q178982
The information in this article applies to:
  • Microsoft Excel 98 Macintosh Edition

SYMPTOMS

In Microsoft Excel 98 Macintosh Edition, if you run a Microsoft Visual Basic for Applications macro or procedure that attempts to set the properties of a control in a worksheet, you may receive either of the following error messages:

   Run-time error '57121':
   Can't exit design mode because Control '<Control>' can not be created.

   Run-time error '32809':
   Application-defined or object-defined error

CAUSE

This problem occurs because ActiveX controls are not supported in Microsoft Excel 98 Macintosh Edition. For additional information, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q176701
   TITLE     : XL98: Error When Pasting ActiveX Controls or Running a Macro

MORE INFORMATION

The following line of code will not work in either Microsoft Excel 98 Macintosh Edition or Microsoft Excel 97 for Windows:

   ActiveSheet.Shapes("ListBox1").ControlFormat.ListFillRange = _
       "$A$1:$A$10"

In Microsoft Excel 98 Macintosh Edition, the code fails because ActiveX controls are not supported. In Microsoft Excel 97 for Windows, the code fails because the ControlFormat object does not apply to ActiveX controls. For more information about this issue in Microsoft Excel 97, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q171075
   TITLE     : XL97: Run-Time Error 438 If Macro Uses ControlFormat Object

If ListBox1 is a Microsoft Excel list box, as opposed to an ActiveX list box, and if the workbook does not contain any ActiveX controls, the code works correctly.


Additional query words: XL98 ocx active x
Keywords : kbdocerr
Version : MACINTOSH:98
Platform : MACINTOSH
Issue type : kbprb
Solution Type : kbworkaround


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: February 3, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.