Receiving Error Message: Cannot Insert Object When Using MS Excel XP

March 9, 2008 by
Filed under: Excel, How To 

Note: The following error message may appear when using a Visual C++ control in Microsoft Excel 2002.

  1. A control is created in Visual C++, thus, this error occurs.  The _wVerMajor and/or _wVerMinor variables were manually changed, and the corresponding type library version number in the .odl file of the project was not changed.
    This happens because Excel 2002 checks to see if these two variables are equivalent in the registry.
  2. This problem can be resolved by changing the version() attribute in the .odl file to reflect the current state of the _wVerMajor and _wVerMinor variables at compile-time.
  3. Another option is by modifying the registry entry HKCR\TypeLib\[Your TypeLib]\X.Y, where X and Y represent the major and minor version numbers respectively.

Comments

Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

You must be logged in to post a comment.