PRB: "Cannot Insert Object" When Inserting ActiveX Control in Excel

ID: Q201634


The information in this article applies to:


SYMPTOMS

When trying to insert an ActiveX control (created in Visual J++ 6.0) into Excel 97, the following error appears:

Cannot insert object.
This happens with the Microsoft virtual machine prior to build 3158.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Launch Visual J++ 6.0.


  2. Select Control from Visual J++ Projects...Components" in the New Project dialog box.


  3. Assign a project name, for example, ProjectN (where N=1,2, and so forth), for example. Click Open.


  4. Select the checkbox for the class on the Project Properties...COM Classes tab.


  5. In the Project Properties...Output Format tab, select Enable Packaging and set Packaging Type to COM DLL.


  6. Build the project. This will build and register the type library/DLL for the project ProjectN.


  7. Launch Excel 97.


  8. From the View menu, point to Toolbars and click Control Toolbox.


  9. Click More Controls on the Control Toolbox.


  10. Select the control just registered, for examplke, ProjectN.ControlN from the Control Toolbox.


  11. Click a cell on the Excel grid.


The following error appears:
Cannot insert object


REFERENCES

For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, please see the following pages on the Microsoft Technical Support site:

http://support.microsoft.com/support/visualj/

http://support.microsoft.com/support/java/

© Microsoft Corporation 1999, All Rights Reserved.
Contributions by Mohan Ananthakrishnan, Microsoft Corporation

Additional query words: kbDSupport


Keywords          : kbActiveX kbCOMt kbCtrl kbJava kbJavaVM kbVJ600 kbWFC kbGrpJava 
Version           : WINDOWS:6.0
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: July 28, 1999