One of the users of our iGrid ActiveX grid control needs to insert it directly into an MS Excel sheet, but they have not managed to do that - the "Cannot insert object" error is generated all the time. We can also reproduce this problem on our test pc under Win7 64-bit and MS Office 2010 32-bit.
This COM control is properly registered in the OS and can be added to VBA UserForms and other apps, but we cannot do that for an Excel sheets. It seems, it's a common problem for ActiveX's - even legacy ones like Microsoft DataGrid Control 6.0. After searching for a solution for a significant amount of time, we concluded it is a security setting in MS Office. So the question can be formulated as the following: How to enable the usage of specific ActiveX controls in MS Office?
Below are the related resources we found and which might help.
First of all, Microsoft states that
Not all ActiveX controls can be used directly on worksheets; some can be used only on Microsoft Visual Basic for Applications (VBA) UserForms. When you work with these controls, Excel displays the message Cannot insert object if you try to add them to a worksheet.
Does anybody know what missing features might prevent an ActiveX control from being insertable into Excel sheets?
Second, there is a known issue with EXD files used to cache ActiveX controls. But we've checked - that's not our case.
Third, there are two technical articles from Microsoft which explain how to "fix" some ActiveX security problems for ActiveX's using the registry:
PRB: Error Message "Cannot insert object" in Excel
http://support.microsoft.com/default.aspx?scid=kb;EN-US;171280
Cannot insert certain scriptable ActiveX controls into Office 2013 documents
http://support.microsoft.com/kb/2793374
It seems, this also does not help - or we just did something wrong.
And the last thing we tried - the Office Trust Center. Allowing the usage of all ActiveX's without any restrictions and adding the folder with our iGrid ActiveX to the list of trusted location didn't help anyhow.
From Technet Forum
Close Excel.
Start Windows Explorer.
Select your system drive (usually C:)
Use the Search box to search for *.exd
Delete all the files it finds.
Start Excel again.
We have had a similar problem in the past with an ActiveX control that we insert on an Excel sheet from our COM Add-in, and you seem to have touched on two of the items (below) to solve it. The following solves the problem most* of the time.
From Excel 2010: File ribbon; Options; Trust Center; Trust Center Settings (button)...;
Note that some of these are usually not necessary if InstallShield properly registered the containing program (e.g. dll). Also notice that we still allow prompting (probably a good idea to pretect your liability). That has not caused us a problem.
This solved it for me:
Go to the following registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Common\COM Compatibility{8856F961-340A-11D0-A96B-00C04FD705A2}
Then set the value data from 400 to 0.
Hope it helps.
Sorry forgot to give credit for the one who found it. Here. http://social.technet.microsoft.com/Forums/office/en-US/7942c472-2b5a-4005-888f-43ece2a5800a/adding-web-browser-control-to-excel-2013?forum=officeitpro&prof=required
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With