Private Sub UserForm_Initialize()
Dim D As Object, I As Integer
Me.ListBox1.ColumnCount = 6
Me.ListBox1.ColumnWidths = "98;98;98;98;98;98"
Me.ListBox1.Width = 300
Set F = Sheets("Traitement")
TC = F.Range("A1").CurrentRegion
Set D = CreateObject("Scripting.Dictionary")
For I = 1 To UBound(TC, 1)
D(TC(I, 1)) = ""
Next I
Me.ComboBox1.List = D.keys
Me.TextBox1.Visible = True
Me.CommandButton1.Visible = True
End Sub
Private Sub ComboBox1_Change()
Dim I As Integer
For I = 1 To UBound(TC, 1)
[COLOR=#fac51c] If TC(I, 1) = Me.ComboBox1.Value Then (=> erreur Type 13 "incompatibilité de type"[/COLOR]
Me.ListBox1.AddItem TC(I, 1)
Me.ListBox1.List(ListBox1.ListCount - 1, 1) = TC(I, 1)
Me.ListBox1.List(ListBox1.ListCount - 1, 2) = TC(I, 2)
Me.ListBox1.List(ListBox1.ListCount - 1, 3) = TC(I, 3)
Me.ListBox1.List(ListBox1.ListCount - 1, 4) = TC(I, 4)
Me.ListBox1.List(ListBox1.ListCount - 1, 5) = TC(I, 5)
Me.ListBox1.List(ListBox1.ListCount - 1, 6) = TC(I, 6)
End If
Next I
End Sub