PRB: "Cannot insert object" in Excel97Last reviewed: July 11, 1997Article ID: Q171280 |
The information in this article applies to:
SYMPTOMSThe error message, "Cannot insert object", appears when you attempt to use your Visual C++ control in Microsoft Excel 97.
CAUSEThis error occurs if you created a control in Visual C++, manually changed the _wVerMajor and/or _wVerMinor variables, and didn't change the corresponding type library version number in the .odl file of your project. This occurs because Microsoft Excel 97 explicitly checks to see if these two variables are equivalent in the registry.
RESOLUTIONTo resolve this problem, you either have to change the version() attribute in your .odl file to reflect the current state of the _wVerMajor and _wVerMinor variables at compile-time, or specifically modify the registry entry HKCR\TypeLib\<Your TypeLib>\X.Y, where X and Y represent your major and minor version numbers respectively.
STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior
REFERENCESFor more information about the wVerMajor or wVerMinor global constants, search for "wVerMajor" or "wVerMinor" in Visual C++ Help. For more information about ODL (Object Description Language) files and the version() attribute, search for "ODL" or "ODL Attributes" in Visual C++ Help. Technology : kbole Version : 97 5.0 Platform : NT WINDOWS Issue type : kbprb |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |