+ Reply to Thread
Results 1 to 3 of 3

List Box Value to drive other Values.

Hybrid View

  1. #1
    Registered User
    Join Date
    06-27-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    11

    List Box Value to drive other Values.

    I have created a list box with 5 values in it... My goal is depending on which of these values is selected I want another list box that only presents specific corresponding values to what was selected. For example, in the first list box I have values A,B,C,D and E; A corresponds to 1,2 or 3, B corresponds to 4,5 or 6 and so on. I want to select "A" in the first list box, and then only be presented with the options of 1,2 or 3 in the second list box; Or, select "B" and only be given the choices of 4, 5 or 6... and so on.

    Any help will be appreciated.

    Regards,

    DSL1970

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644
    Try this.
    Private Sub ListBox1_Change()
          Select Case ListBox1.Value
               Case "A"
                    ListBox2.List = Array(1,2,3)
               Case "B"
                    ListBox2.List = Array(4,5,6)
               Case "C"
                    ListBox2.List = Array(7,8,9)
               Case "D"
                    ListBox2.List = Array(10,11,12)
               Case "E"
                    ListBox2.List = Array(13,14,15)  
           End Select
    End Sub
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    06-27-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: List Box Value to drive other Values.

    I think I may have incorrectly called my entry in List Boxes.... I am using the Data Validation Tool (List Criteria) and populating the first 1,000 Rows in a specific column.

    Column L
    Entry options A, B, C, D, E

    Column M
    List Options for A = 1, 2 or 3
    List Options for B = 4, 5 or 6.....

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1