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

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:

Q176701 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:
Q171075 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


Last Reviewed: November 4, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.