I have written a .Net library which encapsulates some of my business logic that needs to interact with a legacy system. The purpose of this library is to expose a COM interface so that I can call it from Office Applications using VBA.
I've done everything I need to do to get it registered using 64bit Regasm.exe with /codebase /tlb flags. It is visible in my Office Applications and is even showing in intellisense. However, I keep getting the "ActiveX Component cant create object" error.
To try and determine if there was an error in my setup/configuration of the COM interface I created a sepearte .Net library as part of my solution with just a basic class and method to return a "Hellow World". This actually works as expected i.e. I register it in the References dialog in the VBA application and can instantiate it and run the "HelloWorld" method.
Dim simple as SimpleInterface.MyClass
Set simple = New SimpleInterface.MyClass
MsgBox simple.HelloWorld("Say Hello")
Then I make a reference in my new basic VS project to my desired project (business logic) and make a call to one method in here and then make another method in my simple project to expose as a COM interface. I unregister the dll and register as in the method above.
In my VBA application I then unselect the .tlb file close it down re-open it and then re-reference it and then try and run the code. This is when I get the "ActiveX componenent can't create object". I'm assuming this has somethingn to do with dependent dlls in my project but Im unsure as there is very little details with the error.
I'm not sure what I am supposed to do here? Do I need to regsiter all other dependent dlls i.e. I have about 2 or 3 external dll's which I just make a reference to in the VS project? CAn someone tell me how it is possible to find any more futher detail i.e. which is the exact offending dll?