Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List of possible values of an argument in a procedure 1

Status
Not open for further replies.

Viruland

Programmer
Dec 6, 2000
61
BE
I create a procedure with a certain argument to be passed.
When a user uses this procedure he must get a list of all available values for that argument.

example:
myProcedure (aValue As myProcedureValues)

Possible values are:
- MyProcedureValues.SendItem
- MyProcedureValues.DeleteItem
- MyProcedureValues.SaveItem

Possible values are integers
- MyProcedureValues.SendItem (0)
- MyProcedureValues.DeleteItem (1)
- MyProcedureValues.SaveItem (2)

Can someone help me with this.

Live fast, die young and leave a beautiful corpse behind.
 
You need to use an Enum.

Enum myProcedureValues
SendItem = 0
DeleteItem = 1
SaveItem = 2
End Enum

Public Function myProcedure (aValue As myProcedureValues)
'Code here
End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top