I created a new class project. I added a new COM object.
The .ddl contains a single Public Function and one Public method. The method contains one line of code, a msgbox.
I have "Register for COM interop" checked in the Project>Configuration>Compile page.
I have ComVisible(true) in the AsseblyInfo.vb file.
I use RegAsm to register the .dll and the .tlb
I have used RegAsm to create a .reg file and then imorted successfully into the registry.
Now I am pretty much out of tricks.
Here is the problem.
If I open Excel, and go to Macro I cannot add the .dll as a refernce. The exact message I get is "Can't add a refernce to a specified file".
I can reference the .tlb file and the Intelisense works. However, when the Excel Macro code runs I get the error, "Can't find file".
Even though I have tried to keep this simple, I am obviously doing something wrong.
I have zipped and posted the whole project at:
http://patrickdillonphotography.com/Computer/msgboxtextclass.zip
I don't really expect anyone to download it to solve my problem. But if you become as frustrated as I am, I thought it might help to see the actual files. Be aware that I enclosed the .reg file from the RegAsm process. You can view it by opening notepad first and browsing for it. Do not click on the .reg file as I think that might modify your registry.
Thanks,
pat
PS If I create a VB.net 2008 project I can reference this COM object and it works fine. But I need it to work in VBA and VB6.