Help vb6 is not equal to

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ooroboo
    New Member
    • Feb 2008
    • 20

    #1

    Help vb6 is not equal to

    i am doing a very small project to get used to using vb6 but, i am stuck i wont a dialog box to appear when the text is not equal to what i wont it to be . I hope it will make more sense after my basic code

    If TextBox1.Text = "password" Then form2.show()
    If TextBox1.Text = Nothing Then Dialog1.Show()

    i wont to add in a line of command so that if textbox1.text doesn't equal "password" dialog2 will show

    thanks for your time / help

    i think its pretty sure its simple just can't find the code :(
  • maththetraveller
    New Member
    • Mar 2008
    • 1

    #2
    Originally posted by ooroboo
    i am doing a very small project to get used to using vb6 but, i am stuck i wont a dialog box to appear when the text is not equal to what i wont it to be . I hope it will make more sense after my basic code

    If TextBox1.Text = "password" Then form2.show()
    If TextBox1.Text = Nothing Then Dialog1.Show()

    i wont to add in a line of command so that if textbox1.text doesn't equal "password" dialog2 will show

    thanks for your time / help

    i think its pretty sure its simple just can't find the code :(
    Try this:
    If TextBox1.Text <> "password" Then
    ...
    End If

    Comment

    • lotus18
      Contributor
      • Nov 2007
      • 865

      #3
      Originally posted by ooroboo
      i am doing a very small project to get used to using vb6 but, i am stuck i wont a dialog box to appear when the text is not equal to what i wont it to be . I hope it will make more sense after my basic code

      If TextBox1.Text = "password" Then form2.show()
      If TextBox1.Text = Nothing Then Dialog1.Show()

      i wont to add in a line of command so that if textbox1.text doesn't equal "password" dialog2 will show

      thanks for your time / help

      i think its pretty sure its simple just can't find the code :(
      [CODE=vb] If TextBox1.Text = "password" Then
      form2.show()
      Else
      Dialog1.Show()
      End If[/CODE]

      Rey Sean

      Comment

      • ooroboo
        New Member
        • Feb 2008
        • 20

        #4
        Originally posted by lotus18
        [CODE=vb] If TextBox1.Text = "password" Then
        form2.show()
        Else
        Dialog1.Show()
        End If[/CODE]

        Rey Sean
        thanks this worked well thanks ............... ............... ............... .

        Comment

        • lotus18
          Contributor
          • Nov 2007
          • 865

          #5
          Originally posted by ooroboo
          thanks this worked well thanks ............... ............... ............... .
          Glad we could help : )

          Rey Sean

          Comment

          Working...