
Help with passing user defined types as variables in functions - VB4 32bit
Quote:
>I am defining about 20 different user types for database file layouts
>and I am trying to pass each type through a variable in a function
>but, I can't set a variable to a user defined type. I get a type
>mismatch if I use a variant. I looked at the AS ANY declaration but,
>this only works with DLL Declares. Is there any way to pass different
>user defined types through the same variable in a function or
>subroutine?
No. The variable has to be declared As <Name of Type>, ie ...
Type DataRecordType
....
....
....
End Type
Sub SomeRoutine(MyType as DataRecordType)
----------------
Randy Birch, MVP
Visual Basic
Moderator, Fidonet Visual Basic Programmer's Conference
Visit VBnet at http://home.sprynet.com/sprynet/rasanen/