Hi,
I have a form with a number of text boxes. One of which I want to only accept numbers and another I want to only accept text characters (no numbers so only the alphabet). I've been able to restrict one to numbers but I can't get the text only one to work. The coding I use for the numbers-only textbox is below (taken from another thread for TextBoxQuant) and all the attempts I've done for my other textbox (TextBoxUnit) are rubbish.
Any help appreciated.
Private Sub TextBoxQuant_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case vbKey0 To vbKey9, vbKeyBack, vbKeyClear, vbKeyLeft, _
vbKeyRight, vbKeyUp, vbKeyDown, vbKeyTab
Case Else
KeyAscii = 0
Beep
End Select
End Sub
Thanks
Bookmarks