Results 1 to 6 of 6

Thread: [RESOLVED] Drop down values in parameters

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    120

    Resolved [RESOLVED] Drop down values in parameters

    how can i create function that can show parameter value in drop down? i have seen many times but don't know how to create one..

  2. #2
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: Drop down values in parameters

    Are you referring to the intellisense like in the Visual Basic 6 IDE?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    120

    Re: Drop down values in parameters

    Quote Originally Posted by Hell-Lord
    Are you referring to the intellisense like in the Visual Basic 6 IDE?
    Exactly
    Like when we specify paramerter in msgbox

  4. #4
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: Drop down values in parameters

    This link discusses intellisense and some helpful code examples

  5. #5
    Hyperactive Member BillGeek's Avatar
    Join Date
    Jun 2006
    Location
    Canada
    Posts
    440

    Re: Drop down values in parameters

    You need to create an enum:
    Code:
    Private Enum SomeType
        SomeValue = 1
        OtherValue = 2
    End Enum
    Then when adding the parameter to your function, set it as this type.
    Code:
    Function MyFunction(aParameter As SomeType) As Integer
        MyFunction = aParameter
    End Function
    In which case, the return value for MyFunction will be either 1 or 2 in integer type.

    Let me know if this is what you wanted to know...

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    120

    Re: Drop down values in parameters

    Thanks bill thats what i am looking for

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