Private Sub UserForm_Initialize()
With Range("t_BDD").ListObject
If Not .DataBodyRange Is Nothing Then 'Si t_BDD non vide
.Range.Sort key1:=.ListColumns("Num HPP").DataBodyRange, Order1:=xlAscending, Header:=xlYes
With .DataBodyRange
Tab_BDD = .Value
End With
End If
End With
With UForm_List_Agent
With .CBx_Liste_Presents
.ColumnCount = 2
.ColumnWidths = "1;0"
.AddItem Empty
For Lgn = 1 To UBound(Tab_BDD, 1)
If Tab_BDD(Lgn, 3) = "Oui" Then
.Text = Trim(Tab_BDD(Lgn, 2))
If .ListIndex = -1 Then
.AddItem Trim(Tab_BDD(Lgn, 2))
.List(.ListCount - 1, 1) = Trim(Tab_BDD(Lgn, 4))
End If
End If
Next Lgn
.ListIndex = 0
End With
End With
End Sub