Microsoft KB Archive/274222

= Error when you paste ActiveX Controls or run a macro in Excel for Mac =

Article ID: 274222

Article Last Modified on 1/29/2007

-

APPLIES TO


 * Microsoft Excel 2004 for Mac
 * Microsoft Excel X for Mac
 * Microsoft Excel 2001 for Mac
 * Microsoft Excel 98 for Macintosh

-



This article was previously published under Q274222



SYMPTOMS
When you open a workbook in Microsoft Excel for Mac and you copy and paste an ActiveX Control or run a Microsoft Visual Basic for Applications macro, you may receive one or more of the following error messages:

The application &quot;unknown&quot; has unexpectedly quit, because an error of type 3 occurred.

Run-time error '57121':

Can't exit design mode because Control 'CheckBox1' can not be created.

Run-time error '32809':

Application-defined or object-defined error

Run-time error '1004':

Cannot start the source application for this object. There may not be enough memory available.

In Excel X for Mac or a later version, such actions may not cause an error, but they will not work as expected.



CAUSE
This behavior occurs because Microsoft Excel for Mac does not support ActiveX Controls (also called OCX files).

For specific information about each of these error messages, see the &quot;More Information&quot; section.



MORE INFORMATION
You cannot use ActiveX Controls in Microsoft Excel for Mac. If you open a workbook that contains any ActiveX Control, you may receive error messages when you perform certain actions, or the workbook may not function correctly. The following sections describe some of the problems that you may experience in Microsoft Excel for Mac when you use a workbook that contains an ActiveX Control.

You Cannot Insert ActiveX Controls in Microsoft Excel for Mac
In Microsoft Excel for Windows, there are two primary methods you can use to insert an ActiveX Control into a worksheet or into a custom user form. These methods are as follows:
 * To insert an ActiveX Control into a worksheet in Microsoft Excel for Windows, point to Toolbars on the View menu, and then click Control Toolbox. Click the button for the control in the Control Toolbox, and then draw a control on the worksheet. Note that you can add buttons for unlisted controls by clicking the More Controls button.
 * To insert an ActiveX Control into a custom user form, click any one of the tools in the toolbox, and then draw a control in the user form. To add buttons for unlisted controls to the toolbox, right-click the toolbox, and then click Additional Controls on the shortcut menu.

In Microsoft Excel for Mac, there is no Control Toolbox toolbar; therefore, you cannot insert ActiveX Controls into a worksheet. Note, however, that you can use the Forms toolbar to insert a limited selection of controls into a worksheet.

Also, you cannot add unlisted controls to the toolbox when you are working with a user form in Microsoft Excel for Mac. You can use only the default controls that are included in the toolbox. These controls are not ActiveX Controls; therefore you can use them in user forms.

Behavior of Controls in Microsoft Excel for Mac
If you are working with a workbook that was created or modified in Microsoft Excel for Windows, and the workbook contains one or more ActiveX Controls in a worksheet, the controls do not work when you open the workbook in Microsoft Excel for Mac.

Or, if you are working with a workbook that contains a user form that contains controls, the controls work only if they are one of the default controls that you can insert from the toolbox. Nondefault (unlisted) controls do not work in user forms in Microsoft Excel for Mac.

The two known issues that may occur when you open such a workbook in Microsoft Excel for Mac are as follows:
 * The workbook opens, but the controls may appear as rectangles with red &quot;X&quot; symbols.
 * You receive a number of &quot;Graphics Filter Converting&quot; messages. When the workbook opens, the controls appear, but they do not work. You cannot select them with the mouse and delete them.

Behavior of Controls When You Copy and Paste Them
If you attempt to copy and paste a control by copying the cells behind the control, you may receive the following error message:

The application &quot;unknown&quot; has unexpectedly quit, because an error of type 3 occurred.

Or, the control may be pasted correctly but does not work when you click it.

If you copy and paste a control, save the workbook, and then reopen the workbook in Microsoft Excel for Windows, the new control does not work correctly. However, all other controls in the workbook still work when you reopen the workbook in Microsoft Excel for Windows. If you do not copy and paste the controls in Microsoft Excel for Mac, the controls work when you reopen the file in Microsoft Excel for Windows.

Visual Basic for Applications Code May Fail When a Worksheet Contains an ActiveX Control
In Microsoft Excel for Mac, if you open a workbook and then run a Visual Basic procedure that performs any actions that involve a worksheet that contains an ActiveX Control, you may receive error messages similar to either of the following:

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

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

For example, the error may occur when you run a macro that contains one of the following lines of code: ActiveSheet.Controls.Delete xName = Sheets(1).Name  'where Sheets(1) contains a control If these problems occur, open the workbook in Microsoft Excel for Windows and remove the ActiveX Controls from the worksheet. After you remove the controls and save the workbook, the problems do not occur in Microsoft Excel for Mac.

Additional query words: MacXLX Mac XLX XL2001 XL2000 XL98 XL2004 XL2003 XL2002

Keywords: kberrmsg kbprb kbprogramming KB274222

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.