title: Expression Expected and statement error in Visual Basic
body: <p>Guys Help me about my error. There are two errors, I just can't figure it out.<br>
  The 2 errors are:</p>
  
  <ol>
  <li>Expression Expected. = "And" statement on line 4</li>
  <li>End of statement expected. = "Then" Statement on line 5</li>
  </ol>
  
  <p>Here is my code:</p>
  
  <pre><code>Public Class adminlog
      Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
          If TextBox1.Text = My.Settings.Username And
              TextBox2.Text = My.Settings.Password Then
              main.Show()
              Me.Hide()
          Else
              MsgBox("Incorrect Username or Password!", MsgBoxStyle.Information, "Error")
          End If
      End Sub
  
      Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
          reg.Show()
      End Sub
  End Class
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/n2OST.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/n2OST.png" alt="ERROR"></a></p>
  
  <p>Any suggestions will help.</p>