Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Cells(Target.Row, 2) = "TOTAL" Then Exit Sub
If Target.Row > 8 Then
If Target.Column = 21 Or Target.Column = 23 Then
Target.Select
If Target.Value <> "" Then
[COLOR="Red"]If Not IsNumeric(Target.Value) Then MsgBox ("Veuiller saisir un nombre"): Target = "": Exit Sub[/COLOR]
ActiveSheet.Unprotect Password:="LN"
With Userwe
.TextBox1.Value = Target.Row
.TextBox2.Value = Target.Value
.OptionButton1 = True 'valider
.Show
End With
Else: Target.Offset(0, 1).Value = ""
End If
[COLOR="red"]Cells(Target.Row, "V") = Cells(Target.Row, "U") * Cells(Target.Row, "V")
Cells(Target.Row, "X") = Cells(Target.Row, "W") * Cells(Target.Row, "X")[/COLOR] Cells(Target.Row, "Y") = Cells(Target.Row, "V") + Cells(Target.Row, "X")
ActiveSheet.Protect Password:="LN"
End If
End If
End Sub