Make a reference with VB6 to my VB.Net class?

Camaro Z28

Newcomer
Joined
May 7, 2003
Messages
24
Location
Orlando
I already tried checking the checkbox - Register for Com Interopt in the build settings of the class. Whenever I try to get VB 6.0 to reference it, it says "Can't add a reference to the specified file.". Anyone know what I did wrong or didn't do? Thanks for any info.


Jason
 
Just created a VB class library project, Deleted the class1.vb file and added a new item and selected 'COM Class' from the list of options, added a single function that returned a string and built the dll.

Created a new VB6 project tried to add the .TLB file as a reference and it worked just fine.
 
Thanks for the replys. I tried your suggestion and I keep getting a runtime error. I know there is someway to get it to work with the classic versions of VB and .Net. Hmmm.....


Jason
 
You must check Register for Com Interopt checkbox, build your project, then add reference from VB6 to .tlb file.
 
Thanks for your reply. I finally got it to work halfway. I can get a reference to it but I can't get access to anything. Ex: I have a public function name opendrive

If my class object is named newMod


If I try newMod.opendrive

It doesn't show anything when I type newMod.

It doesn't show my functions.

I am still trying to figure that out.

Jason
 
Last edited:
Back
Top