Option Explicit
Dim ShBd As Worksheet, rng As Range, BD, d As Object, temp, temp1
Private Sub UserForm_Initialize()
Dim i As Integer
' Set UserActif = Me
Set ShBd = ThisWorkbook.Sheets("Comptes")
Set rng = ShBd.Range("A6:L" & ShBd.[A65000].End(xlUp).Row)
BD = rng.Value
Set d = CreateObject("Scripting.Dictionary")
For i = LBound(BD) To UBound(BD)
d(BD(i, 2)) = "" 'N°Facture
If Not d.exists(BD(i, 2)) Then d.Add BD(i, 2), BD(i, 10)
Next i
temp = d.keys
temp1 = d.items
Me.ComboBox1.List = temp
End Sub
Private Sub ComboBox1_Change()
If Me.ComboBox1.ListIndex = -1 Then Exit Sub
'c'est ici que je bloque
End Sub