Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
'Limite la saisie aux chiffres + point et limite à un seul séparateur (le point)
If InStr("0123456789.", Chr(KeyAscii)) = 0 Or InStr(TextBox1.Value, ".") <> 0 And Chr(KeyAscii) = "." Then KeyAscii = 0: Exit Sub
If InStr(1, TextBox1.Value, ".") <> 0 Then 'limite à 2 décimales
If Len(TextBox1.Value) > InStr(1, TextBox1.Value, ".") + 1 Then KeyAscii = 0
End If
End Sub