• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User


  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Combobox with index and match function


userform1 contain 2 combobox
both combobox Style is = fmStyleDropDownList

i like to show party name in combbox2 when their path code is select or when party name is select then show party code in comobbox1
now i select party code from combobox 1 then party name is show in combobox 2 but when i select party name from combobox2 then party code is not show in combobox1
for more clearification i attache the sample file


Last edited:

Marc L

Excel Ninja
UserForm1 module :​
Dim B As Boolean

Private Sub CBoxUpdate(oCB As ComboBox, V)
    B = True
    oCB.Text = oCB.List(V)
    B = False
End Sub

Private Sub ComboBox1_Change()
    If Not B Then CBoxUpdate ComboBox2, ComboBox1.ListIndex
End Sub

Private Sub ComboBox2_Change()
    If Not B Then CBoxUpdate ComboBox1, ComboBox2.ListIndex
End Sub

Private Sub UserForm_Initialize()
    With Sheet1.UsedRange.Rows
        ComboBox1.List = .Range("A2:A" & .Count).Value2
        ComboBox2.List = .Range("B2:B" & .Count).Value2
    End With
End Sub
Do you like it ? So thanks to click on bottom right Like !