Re-,
Non, je parle de l'autre code...
If modif = False Then
If ligne = 1 Then
Ref = 1
Else
Ref = onglet.Cells(ligne, 1) + 1
End If
onglet.Select
Cells(ligne + 1, 1) = Ref
Cells(ligne + 1, 2) = Format(tbx_Date.Value, "yyyy/mm/dd")
Cells(ligne + 1, 3) = cbx_Bookmakers.Value
Cells(ligne + 1, 4) = cbx_Sport.Value
Cells(ligne + 1, 5) = tbx_Pari.Value
Cells(ligne + 1, 6) = tbx_Cote.Value
Cells(ligne + 1, 7) = tbx_Mise.Value
Cells(ligne + 1, 8) = cbx_Etat.Value
Cells(ligne + 1, 9) = cbx_CB.Value
Cells(ligne + 1, 10) = cbx_Surebet.Value
Cells(ligne + 1, 11) = cbx_Freebet.Value
Cells(ligne + 1, 14) = tbx_CashOut.Value
Cells(ligne + 1, 15) = tbx_Commentaire.Value
Else
Ref = cbx_Modification.Value
For i = 2 To ligne
If onglet.Cells(i, 1) = Ref Then
Cells(ligne + 1, 2) = Format(tbx_Date.Value, "yyyy/mm/dd")
Cells(ligne + 1, 3) = cbx_Bookmakers.Value
Cells(ligne + 1, 4) = cbx_Sport.Value
Cells(ligne + 1, 5) = tbx_Pari.Value
Cells(ligne + 1, 6) = tbx_Cote.Value
Cells(ligne + 1, 7) = tbx_Mise.Value
Cells(ligne + 1, 8) = cbx_Etat.Value
Cells(ligne + 1, 9) = cbx_CB.Value
Cells(ligne + 1, 10) = cbx_Surebet.Value
Cells(ligne + 1, 11) = cbx_Freebet.Value
Cells(ligne + 1, 14) = tbx_CashOut.Value
Cells(ligne + 1, 15) = tbx_Commentaire.Value
End If
Next
End If
Tu ne vas sur l'onglet "onglet" que si "modif = false"
Précède toutes tes "Cells" par "onglet.Cells...", ça évitera le Select, et les problèmes...