Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. text box validations

text box validations

Scheduled Pinned Locked Moved Visual Basic
help
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MS Lee
    wrote on last edited by
    #1

    hi to all in a form i have 3 text boxes one should accept numbers only 2nd should accepts only characters 3rd should accepts numbers+char+ spl chars,, for the 1st text box i wrote Private Sub TextBox1_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.Leave If Not IsNumeric(TextBox1.Text) Then TextBox1.Text = "" MessageBox.Show("you should enter only numbers") TextBox1.Focus() End If End Sub and this working for remaining two (2nd and 3rd) could you please help me

    self confidence+hard work=SUCCESS

    A 1 Reply Last reply
    0
    • M MS Lee

      hi to all in a form i have 3 text boxes one should accept numbers only 2nd should accepts only characters 3rd should accepts numbers+char+ spl chars,, for the 1st text box i wrote Private Sub TextBox1_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.Leave If Not IsNumeric(TextBox1.Text) Then TextBox1.Text = "" MessageBox.Show("you should enter only numbers") TextBox1.Focus() End If End Sub and this working for remaining two (2nd and 3rd) could you please help me

      self confidence+hard work=SUCCESS

      A Offline
      A Offline
      AndrewVos
      wrote on last edited by
      #2

      Check out the MaskedTextBox, this might meet your requirements. Google has a million examples on it's usage.


      www.wickedorange.com www.andrewvos.com

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups