Can any one tell me what is the difference & purpose of Enumeration, they are named constants right? arn't they the same as any other constant?
What are the advantages/disadvantages...
Thanks!!!
Printable View
Can any one tell me what is the difference & purpose of Enumeration, they are named constants right? arn't they the same as any other constant?
What are the advantages/disadvantages...
Thanks!!!
The advantage/difference with Enumerations are that they are grouped constants, so if you declare a variable or function or property as an enumeration, (you do it: as Enumerationname) so you will get those menus like you get when you type:
If you do it with constants you will always have to check them up from your module, and theres probably possibilites you type it wrong or use other constants instead. In any way it's more comfortable to use enumerations.Code:msgbox (prompt,
How can a variable/funtion be a constant?
variablename = constantname
I'm not sure how you mean?