Can't add a reference to the specified file.

A

Al

In VB 2005 I created Windows Class Library with a single class, put a check
mark at Register for COM interop, compiled it. When I'm trying to add a
reference to this dll in VB6 project I get an error 'Can't add a reference
to the specified file'.
What am I missing.
My goal is to use this dll with both VB2005 and VB6

Thank you
Al
 
H

Herfried K. Wagner [MVP]

Al said:
In VB 2005 I created Windows Class Library with a single class, put a
check mark at Register for COM interop, compiled it. When I'm trying to
add a reference to this dll in VB6 project I get an error 'Can't add a
reference to the specified file'.

Checking the option "Register for COM interop" will create a TLB file for
the DLL. Instead of referencing the DLL file, reference the TLB file from
within the VB6 project.
 

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