
Passing User Defined Type as a parameter in method gives a VB5 error
Hi,
I have defined a method having user defined type variable as one of it's
parameter in a class. This method is declared as a public. VB5 flags this
methods as an error with a msg
" User-defined types and fixed-length strings not allowed as the type of a
Public member of an object module; Private object modules not allowed as the
type of a public member of a public object modules".
Example:
' Defined this type in a standard module
Type TSheath
SHID as integer
CBLID as integer
End Type
' Class FSheath...
' Defined inside class module
Public sub AddSheath (Sh as TSheath)
...
End Sub
VB5 does not complain if I define this method as private.
Anybody know how to circumvent this problem.
Thanks for your help
Hari Somaskanthan