Parameter as a list

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • IT Couple
    New Member
    • May 2009
    • 36

    #1

    Parameter as a list

    Hi

    If I type in VB msgbox "prompt", at this point I have a list of available options vbAbortRetryIgn ore... vbApplicationMo dal... and so on

    Is there a way to create a sub routine with similar parameter which appear as a list. I want my partner to be able to use the procedure and select Edit, Add, Delete from a list instead of typing it (to avoid confusion).

    Many thanks in advanced.
    Emil
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    You have to declare a type for an enumeration using "Enum" instruction. Then declare your subroutine argument as type of this enumeration.

    Comment

    • IT Couple
      New Member
      • May 2009
      • 36

      #3
      Thanks FishVal that is excellent.

      I must admit I have studied in the past but didn't get the use of it until now when I needed it :)

      Thanks for your help.

      Comment

      • FishVal
        Recognized Expert Specialist
        • Jun 2007
        • 2656

        #4
        You are quite welcome. :)

        Comment

        Working...