maabadi
Well-known Member
- Joined
- Oct 22, 2012
- Messages
- 2,681
- Office Version
- 2019
- 2016
- Platform
- Windows
Hi
I want to create two combobox to both selectable and value of them fill automaticly when select value on another combobox, then I write for Combobox1:
AND
I didn't Define any seperate code for Combobox2
But
1. Combobox1 don't show dropdown list when I type on it.
2. Combobox2 don't show value and dropdown list when Update value of Combobox1.
3. How to reverse this action for combobox2
Thanks
I want to create two combobox to both selectable and value of them fill automaticly when select value on another combobox, then I write for Combobox1:
Code:
Private Sub UserForm_Initialize()
Me.ComboBox1.List = Worksheets("Sheet2").Range("B2:B600").Value
End Sub
Code:
Private Sub ComboBox1_Change()
Dim sValue As String
Dim r As Range, rAll As Range
sValue = ComboBox1
Set rAll = Sheet2.Range("B2:C600").End(xlDown)
For Each r In rAll
If r = sValue Then
ComboBox2 = r.Offset(0, 1)
End If
Next r
End Sub
But
1. Combobox1 don't show dropdown list when I type on it.
2. Combobox2 don't show value and dropdown list when Update value of Combobox1.
3. How to reverse this action for combobox2
Thanks