Results 1 to 10 of 10

Thread: Limiting input type in a textbox....how?

Hybrid View

  1. #1
    PowerPoster Simply Me's Avatar
    Join Date
    Aug 2003
    Posts
    2,748

    Re: Limiting input type in a textbox....how?

    You can also use Isnumeric() to limit the entry to numeric only

    VB Code:
    1. If IsNumeric(Text1.Text) = False Then
    2.      MsgBox "Type numeric value", , "Result"
    3.      Text1.SetFocus
    4.      Exit Sub
    5. End If
    To give is always to be NOBLE...
    To received is always to be BLESSED....
    Each day strive to be NOBLE
    Each day strive to be BLESSED

    If this post has helped you. Please take time to rate it.

    >=|+|=< Simply Me >=|+|=<

    ----------------------------------------
    Connection Strings | Number Only in Textbox | Splash Screen with Progress Bar | Printing to 1/2 of perforated bond paper |
    Freeze 2005 DataGridView Column

  2. #2
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Re: Limiting input type in a textbox....how?

    Hang on, has no one thought of using the masked edit box? It acts just like a text box, and you can mask the input so it acts exactl how you wants it to.

    Project > Components > Select "Microsoft Masked Edit Control 6.0" then click ok.

    Then set the mask to 999999999

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