|
-
Apr 11th, 2005, 04:36 AM
#1
Thread Starter
Lively Member
alpha numberic
hi,
i want a textbox accept only alpha numberic and "-" and not allow double spacing. please help in the coding.
Thanks
-
Apr 11th, 2005, 04:44 AM
#2
Addicted Member
Re: alpha numberic
Well, u could check on the textbox_change() sub that the character being entered is valid. By checking for the ascii codes. This would only allow all numbers (0-9), space and the hyphen (-). As for the double spacing, you could either check when the textbox loses focus by searching the textbox for " " (two spaces) or you could check while the user is typing; checks what the last character entered was and if it was a space, exit the sub if another space is pressed
-
Apr 11th, 2005, 04:44 AM
#3
Re: alpha numberic
Have a look at this thread: http://www.vbforums.com/showthread.php?t=288938 - It may help 
Cheers,
RyanJ
-
Apr 11th, 2005, 05:35 AM
#4
Thread Starter
Lively Member
Re: alpha numberic
hi BIOSTALL,
Please provide me with the coding . I have the problem in the avoid double spacing in the text1_change().
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|