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



The information in this article applies to:

  • Microsoft Visual J++ 6.0, when used with:
    • the operating system: Microsoft Windows NT
    • Microsoft Windows 98
  • Microsoft virtual machine

This article was previously published under Q201634

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 support information about Visual J++ and the SDK for Java, visit the following Microsoft Web site:

Modification Type:MajorLast Reviewed:6/14/2006
Keywords:kbCtrl kbJava kbprb kbWFC KB201634