Microsoft KB Archive/110857

{|
 * width="100%"|

XL5: Defining Name in Name Box Causes Type Mismatch Error

 * }

-

The information in this article applies to:


 * Microsoft Excel for Windows, versions 5.0, 5.0c
 * Microsoft Excel for Windows NT, version 5.0
 * Microsoft Excel for Windows, version 7.0

-

SUMMARY
In Microsoft Excel, if you enter a name in the name box on the formula bar and that name is one of the constants reserved for a Visual Basic module sheet, you may receive the following error message:

Microsoft Excel: Type Mismatch

You will have the option to choose OK or Help. If you choose OK the name is created successfully.

MORE INFORMATION
In the Microsoft Visual Basic Programming System, Applications Edition, several predefined constants make programming easier. These constants are descriptive and can be used as parameters in functions and methods in a Visual Basic macro.

Choosing the Help button in the error message dialog box brings up Visual Basic Help and displays the Type Mismatch (Error 13) topic. The information in this help topic does not mention reserved constants as a possible cause for this error message.

WORKAROUND
This problem does not occur when you use the Name command on the Insert menu to define a name.