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
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
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks