I built a COM enabled DLL in VB.NET that I need/want to be able to be able to use from Excel VBA. When I build the DLL and then attempt to use the DLL in an Excel Macro on the same workstation, everything works fine. When I try to port the DLL to another workstation, I had terrible troubles getting the DLL to properly register. Most of the time I could get the DLL to either appear in the list of references in the Tools->add references list in Excel VBA and/or I could select tlb file using the browse button in Tools->add references and the VBA intelisense would see the classes and properties and methods in the DLL.... but when I would try to execute the scripts, it would through an error that either it could not create the ActiveX object and/or the DLL could not be found or was not registered.... I did FINALLY get things to work but I have a question about how and why things worked. On workstation that I installed the DLL to, I got things to work successfully by copying the files to the c:\windows\system32 directory and running regasm from the "microsoft.net\framework64" directory... while on another workstation I had to copy the files the c:\windows\syswow64 directory and I had to run regasm from "mcirosoft.net\framework" directory.... In bother cases, the EXACT SAME DLL and tlb file were used.
Why was it necessary to put the files in different locations and/or run a different version of regasm to get things to work!?!?! How can I tell which place is appropriate to install the files to and which regasm to run when I install this to other systems?
This issue has been chewing up DAYS of my time and I feel like the blind rat that still manages to find a piece a cheese once in a while.... I manage to get it to work now and then, but don't really understand why and how to make it work consistently.
Thanks in advance for any help/clarification!