Private Sub btValider_Click()
Dim Prenom$, Nom$, Val(3) As Boolean, i%, j%, derlig%
derlig = ThisWorkbook.Worksheets("Feuil1").Range("A" & Rows.Count).End(xlUp).Row
Prenom = Me.cboPrenomDuPatient.Value: Nom = Me.cboNomDuPatient.Value
Val(0) = Me.obtVirement.Value: Val(1) = Me.obtCheque.Value: Val(2) = Me.obtEspeces.Value
For i = 0 To 2
If Val(i) = True Then
For j = 15 To derlig
If ThisWorkbook.Worksheets("Feuil1").Cells(j, 2) = Prenom And ThisWorkbook.Worksheets("Feuil1").Cells(j, 3) = Nom Then
ThisWorkbook.Worksheets("Feuil1").Cells(j, i + 6) = ThisWorkbook.Worksheets("Feuil1").Cells(j, i + 6) + 1
GoTo Fin
End If
Next j
End If
Next i
Fin:
Unload Me
End Sub