[RESOLVED] [VBA] Intellisense - specifying your own values
My boss is a keen coder, and just asked me whether or not I had come across the following. I hadn't, and I don't think it is possible (or not easy at least).
He wants to make a function that one argument has only a specific list of values, so that intellisense would only pop up with those values when coding to call the function.
Eg.
Code:
'--- defined in a module somewhere
Public Function DoThatThang(byval lngThisThang as long)
end function
'---- called in code somewhere else
DoThatThang(<intellisense list shown>)
Has anyone done anything like this?
If so, is it difficult to set up?
Re: [VBA] Intellisense - specifying your own values
couldnt you code a class to do this?
1 Attachment(s)
Re: [VBA] Intellisense - specifying your own values
Or you could use an Enum statement to define the possible values. Here's an example
Re: [VBA] Intellisense - specifying your own values
Thanks. That looks perfect.