Trap the keypress
as a starter examplePrivate Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) Select Case KeyAscii Case Asc("0") To Asc("9"): 'OK Case Else: KeyAscii = 0 End Select End Sub
.
Trap the keypress
as a starter examplePrivate Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) Select Case KeyAscii Case Asc("0") To Asc("9"): 'OK Case Else: KeyAscii = 0 End Select End Sub
.
Last edited by Aussiebear; 03-23-2025 at 08:56 AM.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber