+ Reply to Thread
Results 1 to 1 of 1

dependent combo boxes

Hybrid View

  1. #1
    Registered User
    Join Date
    03-17-2014
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    1

    Question dependent combo boxes

    I have 3 combo boxes which are dependent to each other. On combo box 3, I want to add another list which it will depend on both combobox1 and 2. I'm using these code.
    Private Sub UserForm_Initialize()
    
    With ComboBox1
        .AddItem "Animals"
        .AddItem "Sports"
        .AddItem "Food"
    End With
    
    End Sub
    
    Private Sub ComboBox1_Change()
    
    Dim index As Integer
    index = ComboBox1.ListIndex
    
    ComboBox2.Clear
    
    Select Case index
        Case Is = 0
            With ComboBox2
                .AddItem "Dog"
                .AddItem "Cat"
                .AddItem "Horse"
            End With
        Case Is = 1
            With ComboBox2
                .AddItem "Tennis"
                .AddItem "Swimming"
                .AddItem "Basketball"
            End With
        Case Is = 2
            With ComboBox2
                .AddItem "Pancakes"
                .AddItem "Pizza"
                .AddItem "Chinese"
            End With
    End Select
    
    End Sub
    On combo box 3 I want to add another items which it will depend on both combo boxes. Please help. Thanks.
    Last edited by vlady; 03-17-2014 at 08:22 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help, dependent combo boxes or droplists
    By jomacho in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-12-2014, 05:18 PM
  2. Making 3 Combo Boxes Dependent on Each Other
    By ACM2 in forum Excel General
    Replies: 14
    Last Post: 02-26-2012, 07:51 PM
  3. VBA for Dependent Combo Boxes
    By Ansar Hussain in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-07-2011, 11:32 AM
  4. Dependent Combo Boxes
    By HangMan in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-06-2011, 08:10 AM
  5. dependent combo boxes
    By rvc81 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-26-2011, 03:47 PM

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