Option Explicit
Private TblSrc()
Private Sub UserForm_Initialize()
ComboBox1.List = Feuil2.[K2].Resize(Feuil2.Cells(&H100000, "K").End(xlUp).Row - 1).Value
TblSrc = ComboBox1.List
ComboBox2.List = TblSrc
ComboBox3.List = TblSrc
End Sub
Private Sub ComboBox1_AfterUpdate()
RectifierCbx
End Sub
Private Sub ComboBox2_AfterUpdate()
RectifierCbx
End Sub
Private Sub ComboBox3_AfterUpdate()
RectifierCbx
End Sub
Private Sub RectifierCbx()
ComboBox1.List = TblSrc
ComboBox2.List = TblSrc
ComboBox3.List = TblSrc
Supprimer ComboBox1.Text, ComboBox2
Supprimer ComboBox1.Text, ComboBox3
Supprimer ComboBox2.Text, ComboBox1
Supprimer ComboBox2.Text, ComboBox3
Supprimer ComboBox3.Text, ComboBox1
Supprimer ComboBox3.Text, ComboBox2
End Sub
Private Sub Supprimer(ByVal Text As String, ByVal CBx As MSForms.ComboBox)
Dim Svg As String
Svg = CBx.Text
CBx.Text = Text
If CBx.MatchFound Then CBx.RemoveItem CBx.ListIndex
CBx.Text = Svg
End Sub