I have a User Control with a public property which I want to be a user defined type. However, when I try to run my code, I get the following error:
"Compile error: Only public user defined types defined in public object modules can be used as parameters or return types for public procedures of class modules or as fields of public user defined types"
I used the ActiveX Control Interface Wizard to set up the properties and mapped interface members, and chose the UDT from the drop down list for this property.
The UDT is a public type in a regular module within the same project.
What am I missing?
(I am aware this question is likely worth more than 75 points, but thats all I have right now)
For clarification, it is a standard module (.bas).
Also, in experimenting with this problem further, the UDT is not available from the listbox in the ActiveX Control Interface Wizard, unless, after running the wizard, i change the get and let methods for the property to send/recv the UDT. If I run the wizard after that, the UDT is present in the listbox. Not sure if that makes any difference though.