|
-
Nov 27th, 2000, 08:56 AM
#1
Thread Starter
New Member
When passing a UDT array to a function, must the function also be in a public module (.bas)?
In a .bas module I've defined the user-defined type udtMMdata as Public with string, long and single elements. In the same .bas module I then declared the udtMMdata as an array: Public arrMMdata() as udtMMdata.
When I try to pass this UDT array as an argument between two forms in my program, I get the infamous:
"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"
Since I have defined everything in a public object module, I can only conclude that I have to move both the passing and receiving functions into the same .bas. This seems to work so far (I'm still re-writing), but I would like to understand the underlying logic to these rules. Would it matter if I put the passing procedure into a dialog box instead of a form? Or that the receiving procedure is in a MDI child? Like I said, if I understood the logic behind all of this, I think I'd have a better shot of getting it right--not the first time, of course, but maybe the fifth...sixth? Thanks for any help; this is a great forum.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|