I'm working on modelling software in which users are able to write their own VBA macros via the VBA ide. I'm working on a bug that requires me to load up a model created by a customer. The model won't load on my machine but does on his so this is getting in the way of me looking at the actual bug they've reported. The load fails on this line of code:-
VBProject.References.AddFromGuid(guid, majorVersion, minorVersion);
with the following error:-
System.Runtime.InteropServices.COMException: 'Object library not registered'
I can find the guid in the registry and it appears to apply excel (although it appears to reference the exe, not a dll as I'd have expected).
The only difference I can find between the model on his machine and mine is that his VBA project has a reference to the Microsoft Excel 16 Object Library and mine doesn't, which would seem to fit with my findings in the registry. However, I can't seem to add it. I can see the path on his machine:-
C:\Program Files (X64)\Microsoft Office\Root\Office16\EXCEL
That path doesn't exist for me.
My first assumption was that I don't have Office 16 installed. I have office 365 installed. But reading around the net I believe that Office16 is Office 365 (16 is the package, 365 is basically the license under which that package is purchased). I've done a search of the machine for any Excel.dll but not finding it.
Any thoughts?




Reply With Quote