Results 1 to 3 of 3

Thread: Function Auto List

  1. #1

    Thread Starter
    Fanatic Member Blade's Avatar
    Join Date
    Jan 1999
    Location
    Stoke-on-Trent, UK
    Posts
    527

    Question

    HI,
    Is it possible to create functions that have an auto list box appear for some of its arguments, such as the ones you see with the msgbox function (where the list drops down with vbcritical, vbOk etc....). Thanks in advance, Shaun.

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    yup, you want an Enum


    In a public Module (or public Object) put something like this
    Code:
    Public Enum MyEnum
    
        Item1 = 1
        Item2 = 2
        Item3 = 3
    
    End Enum

    And Declare your function Like this
    Code:
    Public Function MyFunction(MyParameter as MyEnum)
    You'll get a nice Picklist of Item1, Item2 and Item3 when you type the function call

  3. #3

    Thread Starter
    Fanatic Member Blade's Avatar
    Join Date
    Jan 1999
    Location
    Stoke-on-Trent, UK
    Posts
    527
    Cheers, that did the job!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width