MXL5: "Error Type 11" Running Macro That Contains InputBox

ID: Q128002

The information in this article applies to:

SYMPTOMS

In Microsoft Excel, when you run a macro that contains the InputBox method or function, if you select a range of cells while the Input dialog box is open, you receive the following error message when you choose OK:

   Sorry, a system error occurred.
   "Microsoft Excel"
   error type 11

CAUSE

The InputBox method or function displays a dialog box that prompts you for input. While the edit box in the Input dialog box is active, you can select cells on a worksheet to enter the range as input in the dialog box. However, when you select a range of cells on a worksheet in a workbook other than the workbook from which you ran the macro, you receive the error message described above. For example, if Workbook1 is active when you run a macro that contains the InputBox method, and you select cells on Workbook2 while the Input dialog box is open, when you choose OK, you receive the "error type 11" error message.

WORKAROUNDS

To work around this problem, select the workbook that contains the range that you want to select in the Input dialog box before you run the macro that contains the InputBox method or function.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Excel version 5.0a for the Macintosh.

REFERENCES

For more information about the InputBox Function or the InputBox Method, choose the Search button in the Visual Basic Reference and type:

   InputBox

Additional query words: 5.00 XL5
Keywords          : kbcode kbprg xlmac 
Version           : MACINTOSH:5.0
Platform          : MACINTOSH
Issue type        : kbbug

Last Reviewed: February 5, 1998