Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicate Type definition in different class modules 1

Status
Not open for further replies.
Oct 5, 1999
105
GB
Hi. I have been writing progs for many years using VB6.
In most of my programs the database I/O is done in a separate class which is compiled as a separate DLL, and so can be called by different programs as required.
Now, however, I want to use two different I/O DLLs in the same program, and I am getting problems as they are both declaring the same data using a Type statement (and both are identical in structure).
For example, they both declare an error variable
Code:
Public Type ERR_DATA
    Code As Long
    Desc As String
End Type
If I try to declare a variable in the calling program e.g.
Dim MyErr as ERR_DATA​
then VB6 does not know which definition to use, and it won't let me use a qualifier on ERR_DATA

There are also several identical other Type structures which are duplicated.

Any ideas
 
Thanks strongm - I was trying the wrong qualifier. It needs the Project name as a qualifier, not the class name which I had tried.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top