Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Error - Cannot Insert Object (ComboBox)

Status
Not open for further replies.

mavest

Programmer
Feb 27, 2003
54
US
I've got an Excel workbook that does some complicated calculations involving VBA and has alot of named ranges, VBA code, and Control objects such as command buttons, comboboxes, etc.

All of a sudden none of the worksheets will allow me to insert a ComboBox or any other control. This is greatly affecting the user's ability to enter data.

Excel flashes a message box stating:
"Cannot insert object."

I've checked if the worksheet or workbook was protected, but no it was unprotected.

Is there any solution to this problem? Has my workbook become corrupted? If it is corrupted is there any recovery? Thanks for your help!
 
Under Tools, Options, View, Objects
make sure Hide All is not selected.

Member- AAAA Association Against Acronym Abusers
 
Thanks all but I've tried both and no solution.
> tried Help/Detect and Repair
> tried Tools/Options/View/Objects - show all was selected.

I did a google search and found at the MS help that this error can occur when someone creates a custom control from say C++ and has a different version in the compile from the actual control. However, this is not my case as this is the standard control set from Excel/MS. However, to be safe I did check my library reference versions and all was ok. A new workbook lets me insert the control, but the important workbook does not.

If anyone comes up with something, I'd appreciate it - thanks!


-Mike
 
For the forum records, I found a solution to the problem, but did not yet find THE solution/reason.

Symptom was that I was getting the above discussed error anytime I tried to insert a standard control object from Excel, such as ComboBox, Command Button, ... I only had this problem for this workbook. All other workbooks were ok. Unfortunately, it would also not allow me to copy a control from another workbook.

A solution: I found that if a emailed the workbook to a different computer, I could add the controls and then email it back. The returning version of the workbook had the desired controls.

From this it seems that there was some issue to the libraries on that particular computer. I did look into this, but did not have the time to pursue deeply as I've got to get the project out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top