Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That's what I meant by typing <vbg.
But I could/should have been more explicit. Rick Rothstein wrote: This'll stop the typing of anything but digits: But, so the OP knows, it will not stop the pasting of non-digits into the TextBox (see the code I posted elsewhere in this thread for a method that will stop all attempts to enter non-digits, whether typed or pasted). -- Rick (MVP - Excel) "Dave Peterson" wrote in message ... This'll stop the typing of anything but digits: Option Explicit Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) Select Case KeyAscii 'numbers Case Asc("0") To Asc("9") 'ok Case Else KeyAscii = 0 Beep End Select End Sub Brad wrote: I have a userform with some text boxes on them. I need to find a way to restrict what the user can enter to integer values only. Any suggestions? -- Dave Peterson -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
TextBox Values | Excel Programming | |||
Textbox values | Excel Programming | |||
How do I add TextBox.values? | Excel Programming | |||
How do I add TextBox.values? | Excel Discussion (Misc queries) | |||
How do I add TextBox.values? | Excel Worksheet Functions |