467,874 Members | 1,748 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,874 developers. It's quick & easy.

Please Help!

Hi

can anyone please tell me what is the function to only allow string values into a text box. I want to apply validation to one of my textboxes on my program to only allow string values and NOT numeric values.

Is there something simular to Isnumeric that only allows numeric values??


Thanks
Nov 15 '06 #1
  • viewed: 859
Share:
1 Reply
100+
Hi

can anyone please tell me what is the function to only allow string values into a text box. I want to apply validation to one of my textboxes on my program to only allow string values and NOT numeric values.

Is there something simular to Isnumeric that only allows numeric values??


Thanks
hi

Isnumeric will still allow numeric input, which you may deny using IsNumeric
a way of blocking input of figures:

Private Sub Text_KeyPress(KeyAscii As Integer)
If InStr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQ RSTUVWXYZ" + Chr(8), Chr(KeyAscii)) = 0 Then KeyAscii = 0
End Sub
Nov 15 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by tyler_durden | last post: by
23 posts views Thread by Jason | last post: by
5 posts views Thread by tabani | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.