Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Bernie, that is a more than good point. To be 'proper' it should also
cater for comma separators, and European usage of comma rather than decimal point. Might get around to all that one day<vbg -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Bernie Deitrick" <deitbe @ consumer dot org wrote in message ... Bob, The code would need to check for decimal points as well as number keypad usage, so it would need three more cases: period, number keypad numbers, and number keypad decimal. Bernie Here is a textbox event that only allows numeric input Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) Select Case KeyAscii Case 48 To 57 'Nos 0 - 9 Exit Sub Case 32 ' space Case Else Application.EnableEvents = False KeyAscii = 0 Application.EnableEvents = True Beep End Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Textboxes | Excel Discussion (Misc queries) | |||
Looping through textboxes | Excel Discussion (Misc queries) | |||
tab between several textboxes | Excel Worksheet Functions | |||
Excel Textboxes | Excel Programming | |||
userform textboxes again | Excel Programming |