Results 1 to 4 of 4

Thread: Ignoring 1s and 0s in a TextBox

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2012
    Posts
    3

    Ignoring 1s and 0s in a TextBox

    I'm new to Visual Basic express 2010 and I'm trying to figure out a tiny code to get my TextBox to ignore 1s and 0s and clear the TextBox.
    This is what I have currently :

    Code:
    If (txtPhoneNumber.Text) = ("1") Or ("0") Then
                        txtPhoneNumber.Text = ""
                        MessageBox.Show("Phone Numbers Must Not Contain 1s or 0s!", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                    End If
    The current code doesn't work at all so I'm looking for something that will.

    Thank you in advance for looking!
    Last edited by OmeshPH; Aug 3rd, 2012 at 10:50 PM.

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