Consulting

Results 1 to 2 of 2

Thread: Sleeper: Looking for a data validation-like function

  1. #1
    VBAX Newbie
    Joined
    Apr 2005
    Posts
    1
    Location

    Sleeper: Looking for a data validation-like function

    Hi ,
    I'm currently making a worksheet. For a particular column, the following must happen when the user selects a cell in that column:
    -a dropdown icon appears next to the cell
    -when he/she clicks the icon, a dropdown list appears in which values are shown. These values are present in an array 'aValidValues' .
    -when the user clicks at a value in the dropdown list, the value becomes present in the cell itself.
    -when the user selects another cell, the dropdown icon/list disappears at the previously selected cell. The value in the cell remains.

    This looks familiar eh? It looks like the data validation functionality. However, I want some extra things:

    When the user selects a cell and enters a string in that cell
    -each array-item in the aValidValues array is checked for presence of the string
    -if the array-item contains that string, it must appear in the dropdown list
    -if the array-item does not contain the string, it must not appear in the dropdown list
    -now the user can select a value from the (smaller) list, etc....

    How can I implement this ? I can figure out the search-routine by myself, but I don't know:
    -how you can put a dropdown icon/list at a cell
    -how values of an array can be copied into the dropdown list of the cell.

    Thanks in advance/regards
    Ron

  2. #2
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    Hi Ron and welcome to VBAX

    I think you might want to take a look at this KB article. It shows how to add your own items to the worksheet right-click menu. You can adapt it to add a data validation item with the various options on a sub-menu.

    Hope it helps
    K :-)

Posting Permissions

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