Private Sub UserForm_Initialize()
Dim I1 As Long
Dim Mois As String, Annee As String
Erreur
travdem
With ListBox1
.Clear
'.ColumnCount = 6
'.ColumnWidths = "100,100 ,100,50 ,20,50"
.AddItem "Nom"
.List(.ListCount - 1, 1) = "Prénom"
.List(.ListCount - 1, 2) = "Nom p"
.List(.ListCount - 1, 3) = "Date"
.List(.ListCount - 1, 4) = "Nombre"
.List(.ListCount - 1, 5) = "Quantité"
For I1 = LBound(Tbl, 1) To UBound(Tbl, 1)
If Tbl(I1, 0) <> "" Then
'If Tbl(I1, 4) > 1 Then
.AddItem Tbl(I1, 0)
.List(.ListCount - 1, 1) = Tbl(I1, 1)
.List(.ListCount - 1, 2) = Tbl(I1, 2)
'solution 1
'Date1 = "'" & Month(Tbl(I1, 3)) & "/" & Year(Tbl(I1, 3))
'.List(.ListCount - 1, 3) =Date1
'solution 2
Mois = Str(Month(Tbl(I1, 3)))
Annee = Str(Year(Tbl(I1, 3)))
.List(.ListCount - 1, 3) = Mois & "/" & Trim(Annee)
.List(.ListCount - 1, 4) = Tbl(I1, 4)
.List(.ListCount - 1, 5) = Tbl(I1, 5)
'End If
End If
Next I1
End With
End Sub