Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hi again
I crated a User Form in VB and added a TextBox and i want the user to be able to enter 'Numbers only' not characters can anyone provide info please, if the user is trying to input other then numbers give no respond. thnx in advance |
#2
![]() |
|||
|
|||
![]()
Something like:
Option Explicit Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) Select Case KeyAscii Case Asc("0") To Asc("9") 'do nothing Case Else Beep KeyAscii = 0 End Select End Sub Kel wrote: Hi again I crated a User Form in VB and added a TextBox and i want the user to be able to enter 'Numbers only' not characters can anyone provide info please, if the user is trying to input other then numbers give no respond. thnx in advance -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Use a text box to calculate and show results in a user form | Excel Discussion (Misc queries) | |||
Print scrollable user form. | Excel Discussion (Misc queries) | |||
user form | Excel Discussion (Misc queries) | |||
Data Entry Alert in User Form | Excel Discussion (Misc queries) | |||
A "previous" button on a user form | Excel Discussion (Misc queries) |