Results 1 to 4 of 4

Thread: [RESOLVED] [VBA] Intellisense - specifying your own values

  1. #1

    Thread Starter
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Resolved [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?

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  2. #2
    Addicted Member
    Join Date
    Jan 2002
    Location
    Glasgow, Scotland
    Posts
    202

    Re: [VBA] Intellisense - specifying your own values

    couldnt you code a class to do this?
    if you fail to plan, you plan to fail

  3. #3
    Frenzied Member DKenny's Avatar
    Join Date
    Sep 2005
    Location
    on the good ship oblivion..
    Posts
    1,171

    Re: [VBA] Intellisense - specifying your own values

    Or you could use an Enum statement to define the possible values. Here's an example
    Attached Images Attached Images  
    Last edited by DKenny; May 11th, 2006 at 08:59 AM.
    Declan

    Don't forget to mark your Thread as resolved.
    Take a moment to rate posts that you think are helpful

  4. #4

    Thread Starter
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: [VBA] Intellisense - specifying your own values

    Thanks. That looks perfect.

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

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