Bonjour,
Je t'ai débogue la macro :
Private Sub Aff_Com_Click()
Dim WsCo As Worksheet
Dim iR&, i%,k%, Temp$
Dim SelCom As Commande
Set WsCo = Worksheets("Cdes")
iR = WsCo.Range("A65536").End(xlUp).Row + 1
i = 2
With G_Clients.ListView2
k = .SelectedItem.Index
Temp = .ListItems(k).ListSubItems(1).Text
For i = 2 To iR
If WsCo.Cells(i, 3) = Temp Then
With SelCom
.NumCom = WsCo.Cells(i, 1)
.IdC = WsCo.Cells(i, 2)
.Désignation = WsCo.Cells(i, 3)
.Montant = WsCo.Cells(i, 4)
.DateCom = WsCo.Cells(i, 5)
.DateLiv = WsCo.Cells(i, 6)
Message = MsgBox("N°Commande : " & .NumCom & vbCrLf & _
"Id Client : " & .IdC & vbCrLf & _
"Désignation : " & .Désignation & vbCrLf & _
"Montant : " & .Montant & vbCrLf & _
"Commande du : " & .DateCom & vbCrLf & _
"Livraison : " & .DateLiv, vbOKOnly + vbInformation, Commande)
End With
End If
Next
End With
End Sub
A+