Private Sub ComboBox2_Change()
Dim L%, i%
If ComboBox2.ListIndex = -1 Then Exit Sub
L = ComboBox2.List(ComboBox2.ListIndex, 1)
ComboBox3.Clear
For i = 2 To 5
If UCase(Cells(L, i)) = "X" Then ComboBox3.AddItem Cells(1, i)
Next
End Sub
Private Sub UserForm_Initialize()
Dim T, i%
With Sheets("DB")
T = .Range([a2], [a65000].End(xlUp)).Value
End With
With ComboBox2
.ColumnCount = 2
.ColumnWidths = .Width & ";" & 0
For i = 1 To UBound(T)
If Not IsEmpty(T(i, 1)) Then
.AddItem T(i, 1)
.List(.ListCount - 1, 1) = i + 1
End If
Next
End With
End Sub