Results 1 to 2 of 2

Thread: Fill ComboBox With Values From Corresponding Dynamic Column Based On Value Selected

  1. #1
    Senior Member
    Join Date
    Mar 2013
    Posts
    107
    Rep Power
    12

    Fill ComboBox With Values From Corresponding Dynamic Column Based On Value Selected

    What needs to be changed in the code so that the each combobox total list is available.When selecting Userform- Internal (category) the Comboxbox Part in the userform only has 9 entries so when i select Part No. and Fault it only shows also 9 entries but there are more on the list which are not available.Can each Combobox (Part,Part No.,Fault) be able to show all the items in there list

    Thanks

    Paul
    Attached Files Attached Files

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    Try this

    Code:
    Private Sub ComboBox3_Change()
    
        Dim lngCol As Long
        With Worksheets("sample")
            lngCol = .Rows(2).Find(What:=Me.ComboBox3.Text, lookAt:=xlWhole).Column
            Me.ComboBox4.List = .Range("A4:A" & .Cells(.Rows.Count, lngCol).End(xlUp).Row).Offset(, lngCol - 1).Value2
            Me.ComboBox5.List = .Range("A4:A" & .Cells(.Rows.Count, lngCol + 1).End(xlUp).Row).Offset(, lngCol).Value2
            Me.ComboBox6.List = .Range("A4:A" & .Cells(.Rows.Count, lngCol + 2).End(xlUp).Row).Offset(, lngCol + 1).Value2
        End With
        
    End Sub
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

Similar Threads

  1. Replies: 8
    Last Post: 08-17-2013, 04:03 AM
  2. Replies: 5
    Last Post: 08-10-2013, 04:15 PM
  3. Replies: 9
    Last Post: 08-02-2013, 07:55 PM
  4. Combobox with Dynamic Date Range
    By paul_pearson in forum Excel Help
    Replies: 5
    Last Post: 07-21-2013, 06:14 PM
  5. Offset based on Values in Column E
    By mrmmickle1 in forum Excel Help
    Replies: 7
    Last Post: 12-04-2012, 10:06 AM

Posting Permissions

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