Hello;
my problem is that I have a userform with several textbox( CA1....CA13 ; CHA1...CHA13; EMT1...EMT13; C1....C13; AL1...AL13; I want my textbox accepts only numeric values.
i have this code but i want simplify this code and don't repeat every textbox:
Private Sub CA1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
' Si la valeur n'est pas comprise entre 0 et 9 et qu'elle n'est pas un backspace
If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or KeyAscii = 8) Then
KeyAscii = 0 'on annule la pression sur la touche
End If
End Sub
Bookmarks