Solved

"Cannot Insert Object" when adding Excel ActiveX Control Button

Posted on 2012-04-05
6
11,580 Views
Last Modified: 2012-04-06
I am trying to add an ActiveX control button to a spreadsheet that already contains activeX controls.  I am getting the error message "Cannot Insert Object".

Does anyone know how to allow the insertion of ActiveX components?

Thanks!
0
Comment
Question by:billelev
  • 4
  • 2
6 Comments
 
LVL 41

Expert Comment

by:dlmille
ID: 37814054
Are you doing it on a protected sheet?  If so, then unprotect.

Can you add that control to a new workbook's active sheet?

If not, are you trying to do it manually or via VBA?

Finally, exactly which control are you adding?
0
 

Author Comment

by:billelev
ID: 37814168
It's not a protect sheet

I cannot add it to a new sheet

I'm trying to add manually

None of the ActiveX controls are able to be added, but the control I want to add is a Command Button.
0
 
LVL 41

Expert Comment

by:dlmille
ID: 37814246
Can you add on a new workbook?
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 41

Accepted Solution

by:
dlmille earned 300 total points
ID: 37814362
It would be useful to know if you can add controls to a new workbook, right after opening Excel 2010.

However, please respond to the following which hopefully will help resolve the problem.

1.  Have you had a recent Office upgrade?  Here's one possible solution:

Try clearing out all the files and folders in the user TEMP directory. If there are older controls in there from previous use, that particular error "Cannot Insert Object" may occur.

2.  Whether you've upgraded or not (and given you have 2010, its likely), perhaps an Office repair is in order:

In Office 2010 the Detect and Repair option has been removed from within the office products.

To run a repair > open control panel > programs and features (add/remove programs in XP) > find MS Office 2010 > select change button > select repair.

Please advise whether this is successful or not.  After doing the repair and reboot (if necessary) just open Excel and try to add the command button control.  Was that successful?  Then try with the workbook that's giving you problems.

Cheers,

Dave
0
 

Author Comment

by:billelev
ID: 37816525
Dave, I can indeed add the controls when a new workbook is opened.  It therefore appears to be an issue with the workbook already in existence.  and actually, I just tried the original sheet, and this time it worked.  So it must have been that the sheet I had opened had been corrupted somehow.
0
 
LVL 41

Expert Comment

by:dlmille
ID: 37816968
That's where my mind is at.  If you can do it with other workbooks, then the workbook you're working on may be headed towards corruption.  Suggest making backups periodically and be prepared to have to rebuild it in the future.

Glad its resolved at least at this point.

Dave
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
powershell add exchange property to a report 12 50
Move data from one sheet to another 11 30
Office 2016 without internet 6 36
Merging spreadsheets 8 33
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question