title: User Defined Type (UDT) as parameter in public Sub in class module (VB6)
body: <p>I've tried to solve this problem, but can't find any solution. I have a UDT defined in a normal module, and wanted to use it as parameter in a <code>Public Sub</code> in a Class Module. I then get a compile error:</p>
  
  <blockquote>
    <p>Only public user defined types defined in public object modules can be used as parameters or return type for public procedures of class modules or as fields of public user defined types</p>
  </blockquote>
  
  <p>I then try to move my UDT in the class, declared as <code>Private</code>. I get this compile error:</p>
  
  <blockquote>
    <p>Private Enum and user defined types cannot be used as parameters or return types for public procedures, public data members, or fields of public user defined types.</p>
  </blockquote>
  
  <p>I finaly try to declare it as <code>Public</code> in the class, and get this compile error:</p>
  
  <blockquote>
    <p>Cannot define a Public user-defined type within a private object module.</p>
  </blockquote>
  
  <p>So is there any way to have a public UDT used as a parameter in a public sub in a class?</p>