Private Sub BoiteAChiffres_KeyPress(KeyAscii As Integer)
'Keypress
Dim chaine
chaine = "0123456789 "
If InStr(1, chaine, Chr(KeyAscii)) = 0 And Not KeyAscii = 8 Then
'KeyAscii = 8 est la touche Del
'On bloque ce qui n'est pas compris dans la variable chaine sauf la touche Del
Beep
KeyAscii = 0
'On assign un KeyAscii vide à la text box
End If
End Sub