Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Static i As Byte
For i = 1 To 4
If i = 5 Then Exit Sub
If InStr("0123456789.", Chr(KeyAscii)) = 0 Then
KeyAscii = 0
UserForm1.Label3.Caption = "Attention !!! caractere interdit"
Application.Wait Now + TimeValue("00:00:01")
UserForm1.Label3.Visible = False
Application.Wait Now + TimeValue("00:00:01")
UserForm1.Label3.Visible = True
End If
Next i
UserForm1.Label3.Visible = False
End Sub