View Single Post
 
Old 02-17-2020, 08:12 PM
dougharter dougharter is offline Windows 10 Office 2016
Novice
 
Join Date: Feb 2020
Posts: 2
dougharter is on a distinguished road
Default system cannot find microsoft.office.interop.excel

I have had to delete and reinstall the databaseengine.exe for Ace.12.0. The installation instructions indicate it is Ace 12. The program was originally set up to use Outlook and Excel. The reference for Outlook & Excel 16 Object library are in the references and I can even add Word if I want. However, I cannot add microsoft.office.interop.excel. It is in the available references, but when I add, it says the system cannot find it. I even browsed to the location in the reference but the system still cannot find it. I am using the VB2008 compiler and Office 365 Personal bought around 2 years ago and Windows 10, latest version.



I finally copied from a 10-day-old backup the whole program working directory, when it was working. It has

Imports Excel = Microsoft.Office.Interop.Excel

several times in the .vb files and there is no reference to interop.excel. When I ran the program and executed the Excel portion, I got on the workbooks.open:



Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 'Microsoft.Office.Interop.Excel._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000208D5-0000-0000-C000-000000000046}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).


After this I tried adding the reference to interop.excel and got the same error message as before. What else can I try?
Reply With Quote