Private Sub UserForm_Activate()
Dim Table As Range, ColWidth(), CW$, Tabl, tablNom, C&
Set Table = Sheets("BDD").ListObjects("Tableau1").DataBodyRange
Tabl = Table.Value ' on prend tout le databodyrange du listobject("tableau")dans une variable tableau
tablNom = Application.Index(Tabl, 0, 4) ' on cré un tableau avec la colonnes des noms
With ComboBox1
.ColumnCount = UBound(Tabl): .ColumnWidths = "60;55;25;60" 'parametrage combo
For i = 1 To UBound(tablNom) 'on boucle sur les noms si x=i alors il n'y est pas encore on le met sinon non
x = Application.IfError(Application.Match(tablNom(i, 1), tablNom, 0), 0)
If i = x Then
ComboBox1.AddItem ""
For C = 1 To UBound(Tabl, 2)
forme = "@"
If C = 3 Then forme = "000"
If C = 1 Then forme = Table.Cells(1).NumberFormat
.List(.ListCount - 1, C - 1) = Format(Tabl(i, C), forme)
Next
End If
Next
End With
End Sub