Reputation: 23
Private Sub CommandButton1_Click()
If TextBox1 = Hayu And TextBox2 = 2007 Then
MsgBox = "login successful"
Me.Hide
Else
MsgBox = "incorrect creditanls"
End If
End Sub
Upvotes: 0
Views: 258
Reputation: 96753
Does this work better:
Private Sub CommandButton1_Click()
If TextBox1 = "Hayu" And TextBox2 = "2007" Then
MsgBox "login successful"
Me.Hide
Else
MsgBox "incorrect creditanls"
End If
End Sub
Upvotes: 2