A Proud Nerd
New member
I am doing a App to Login with Username and Password. This is the code I used:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = ("XXX") And (TextBox2.Text) = 123 Then
MsgBox("Hello XXX")
End If
End Sub
End Class
Here's the problem, I need to add a "Close()" function in case the password is not 123, but I am not sure how to do it.
Can anyone help me, please?
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = ("XXX") And (TextBox2.Text) = 123 Then
MsgBox("Hello XXX")
End If
End Sub
End Class
Here's the problem, I need to add a "Close()" function in case the password is not 123, but I am not sure how to do it.
Can anyone help me, please?