Private Sub CommandButton3_Click()
Dim lig As Integer
Dim Cible As Integer
If ListBox1.ListIndex = -1 Then Exit Sub
lig = ListBox1.ListIndex + 2
With Worksheets("BD")
.Columns("A:K").Rows(lig).ClearContents
.Cells(lig, 1) = CDate(TextBox1)
.Cells(lig, 2) = TextBox9.Value
.Cells(lig, 3) = TextBox10.Value
.Cells(lig, 4) = TextBox2.Value
.Cells(lig, 5) = TextBox3.Value
.Cells(lig, 6) = TextBox4.Value
.Cells(lig, 7) = TextBox5.Value
.Cells(lig, 8).FormulaLocal = "=" & _
.Cells(lig, 7).Address(False) & "/" & .Cells(lig, 6).Address(False)
.Cells(lig, 9).FormulaLocal = "=" & _
.Cells(lig, 5).Address(False) & "/" & .Cells(lig, 8).Address(False)
.Cells(lig, 10) = TextBox8.Value
.Cells(lig, 11) = TextBox13.Value
' on redéfinit la plage des MFC
For Each Mfc In .Cells.FormatConditions
Mfc.ModifyAppliesToRange .Range("$I2:$I" & .Rows(.Rows.Count).End(xlUp).Row)
Next
End With
Charge_Listbox1
End Sub