Private Sub TextBox1_AfterUpdate()
Dim signe$, nb&, i&
signe = "+"
For i = 1 To Len(TextBox1)
If Right(TextBox1, 1) = signe Then
MsgBox "Il y a un signe + en trop" & vbLf & "Veuillez rectifiez", vbExclamation, "ERREUR"
Exit For
ElseIf Mid(TextBox1, i, 1) = signe Then
nb = nb + 1
End If
TextBox2 = nb
Next i
End Sub
Private Sub TextBox2_Enter()
TextBox1.SetFocus
End Sub