Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've got a userform with multiple textboxes, each corresponding to
different types of data. I'm trying to limit the possible errors that can occur. One of my textboxes, corresponds to a zip code. The code I have to restrict possible entries to number is as so: Private Sub ZipCode_KeyDown(ByVal KeyCode As _ MSForms.ReturnInteger, ByVal Shift As Integer) If KeyCode < 48 Or KeyCode 57 Then KeyCode = 0 Beep End If End Sub However, the two problems I have is that. A) The user cannot use the keypad. What are the keycodes to enable the use of the keypad. B) The user cannot use the backspace key, to correct an entry. How can I limit the entries to numbers, but allow them to use the keypad? And allow them to correct themselves, with the backspace key? Thanks. *** Sent via Developersdex http://www.developersdex.com *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Keycode description creator | Excel Discussion (Misc queries) | |||
HELP! I Lost The Ability To Advance From TextBox To TextBox With the ENTER Or The TAB Keys | Excel Programming | |||
detecting keycode internationally | Excel Programming | |||
Textbox Bug? Missing/delayed update of textbox filled via VBA | Excel Programming | |||
Textbox Bug? Missing/delayed update of textbox filled via VBA | Excel Programming |