Referencing .NET DLL built for COM in VBA

J

J. Caplan

I have a DLL that I wrote in .Net (VS 2005) and built for Com Interop. I can
make a reference to the DLL inside of my Excel 2003 VBA code by choosing
Tools->References from the VBA editor. I can create an instance of the
object and everything works fine.

The problem I am having is when I take this DLL and put it on a different
machine along with the XLA code that I created above. I ran Regasm.exe
/Codebase <Full path of DLL name> for the .NET Com Interop DLL. The Excel
Add-in on this machine fails to find the DLL. If I look in the
Tools->References in Excel VBA on this machine, it shows that the DLL is
missing and wants to find it at the same path that it was on my machine.

I even cleaned up the DLL on my machine and just copied the DLL to my
machine and ran Regasm on it. Now I can't reference the DLL on my machine.
Only when I build through Visual Studio on my machine can I see the reference
from VBA.

What else is Visual Studio doing to register this DLL besides just running
Regasm?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top