Knowledge Base

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

Article ID: 201634

Article Last Modified on 6/14/2006


APPLIES TO


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:

Additional query words: kbDSupport

Keywords: kbjava kbprb kbctrl kbwfc KB201634