I want to create a user-defined data-type that can be used by my classes.
I put the code



public Type Part
PartID as string
Qty as Byte
End Type





in my standard module(.bas file).

But I get the error message
"Only public user-defined types defined in object modules can be used as parameters or return types for public procedures of class modules or as fields for public user defined types" during the compilation of




public Function Add(p as Part)

Dim i as Integer

'jkjkjskdj
'ksdkjkjsdkj
'iwusjdus



End Function





which is in my class module.
Help says the help topic is not anchored and that it cannot be found.

If I put the user-defined data type definition in the Class module, VB says that is not possible too.

What's the way out?

Deepak

Ps. Please try to reply with complete code of an example application ;-)