Could anyone explain in a couple of sentences the purpose of using Enum and Type (or would it take a lot longer) and what UDT is !!!
Thanks for any help
steve
Printable View
Could anyone explain in a couple of sentences the purpose of using Enum and Type (or would it take a lot longer) and what UDT is !!!
Thanks for any help
steve
UDT (User-defined Data type) is the result of a Type statement. You create a UDT by putting together fields of the standard object types in one group and treating it like one object. For example, you have a program about bugs (insects, spiders, etc.) and their individual characteristics. You could have 15 different fields describing them, or you could put those 15 fields into a UDT and have one object. Instead of moving around each of the 15 fields, you just move one UDT object. An Enum is a UDT kind of object that contains a bunch of related constants instead of data fields. I see no use for Enum, but I use UDTs all of the time.
Hi,
Enums have their use!! ;) Using Enum as constants, you can use those in function parameters so that when the function is called, you get a drop-down list of available options for the values of that parameter. (like in the msgbox function where you have vbAbort,vbOk etc...).
I like them anyway as it saves having to remember values!!
Shaun
I stand corrected. You learn something new every day, especially here!
Thanks for the help
Steve