Can't add a reference to the specified file.

  • Thread starter Thread starter Al
  • Start date Start date
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
 
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.
 
Back
Top