I have a class library written in .Net that I would like to make available for VB6 / VBA. What I tried did not work (obviously, as I ask this question). Here is what I did:
- I created a class library project in Visual Studio 2010 Express and put the code in a class module.
- I opened the project properties and went to "Assembly Information" and checked the "Make COM Visible" checkbox.
- I went to the "Advanced Compile" option and targeted .Net 2.0 (this is very simple code).
- Then I deleted all the links for the "System".
- I built a project (no warnings or errors) and copied the DLL from the Bin folder to C: \ Windows \ System32 \
- I ran RegSvr32 to register the dll and got an error:
The module "MyDll.dll" was loaded, but the entry point DLLRegisterServer was not found.
Verify that "MyDll.dll is a valid DLL or OCX file, and then try again.
Clearly, my first attempt was a bit naive. Can anyone suggest a guide?
Oorang
source share