Results 1 to 4 of 4

Thread: alpha numberic

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    81

    Red face alpha numberic

    hi,

    i want a textbox accept only alpha numberic and "-" and not allow double spacing. please help in the coding.

    Thanks

  2. #2
    Addicted Member BIOSTALL's Avatar
    Join Date
    Apr 2005
    Location
    Northampton, UK
    Posts
    180

    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

  3. #3
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: alpha numberic

    Have a look at this thread: http://www.vbforums.com/showthread.php?t=288938 - It may help


    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    81

    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
  •  



Click Here to Expand Forum to Full Width