×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Duplicate Type definition in different class modules

Duplicate Type definition in different class modules

Duplicate Type definition in different class modules

(OP)
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

RE: Duplicate Type definition in different class modules

Fully qualify it: Class.ERR_DATA

RE: Duplicate Type definition in different class modules

(OP)
Thanks strongm - I was trying the wrong qualifier. It needs the Project name as a qualifier, not the class name which I had tried.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close