The information in this article applies to:
SYMPTOMSWhen you click a control from the Forms toolbar (such as a Button) to run a Microsoft Visual Basic for Applications macro, and that macro uses the Close method, you may receive the following error message: If you click Details, you receive an error message similar to the following:
CAUSEThis problem occurs when the following conditions are true:
WORKAROUNDTo close the active workbook without receiving the error message, use either of the following methods. Method 1: Use an ActiveX Control Instead of a Forms ControlInstead of running your macro with a control from the Forms toolbar, consider using an ActiveX control instead. For example, if you currently use a Button control from the Forms toolbar, use a CommandButton control (which is an ActiveX control) from the Control Toolbox instead.To attach your current code to the Click event of the ActiveX control, double-click the command button. In the CommandButton1_Click event procedure, copy your code from the Forms button. Method 2: Select a CellSelect a cell on the worksheet before you click the Forms control that runs your macro. This removes the focus from the ActiveX control, allowing the workbook to close properly. You can either select a cell using your mouse or use a macro assigned to the ActiveX control's Click event to select a specified cell for you.To select a cell in a macro, add a statement similar to either of the following in the Click event procedure of your ActiveX control.
-or-
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. Additional query words: XL2000 ipf gpf crash crashes crashing crashed quit quitting quits fail fails failing failed break hang freeze stops responding radio button check box option list combo toggle
Keywords : kberrmsg |
Last Reviewed: June 10, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |