By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,644 Members | 2,105 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,644 IT Pros & Developers. It's quick & easy.

Please Help!

P: 2
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
Share this Question
Share on Google+
1 Reply


100+
P: 267
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.