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..
Printable View
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..
Are you referring to the intellisense like in the Visual Basic 6 IDE?
ExactlyQuote:
Originally Posted by Hell-Lord
Like when we specify paramerter in msgbox
This link discusses intellisense and some helpful code examples ;)
You need to create an enum:
Then when adding the parameter to your function, set it as this type.Code:Private Enum SomeType
SomeValue = 1
OtherValue = 2
End Enum
In which case, the return value for MyFunction will be either 1 or 2 in integer type.Code:Function MyFunction(aParameter As SomeType) As Integer
MyFunction = aParameter
End Function
Let me know if this is what you wanted to know... :)
Thanks bill thats what i am looking for :)