Private Sub CommandButton1_Click()
If TextBox1.Text = "apple" Or TextBox2.Text = "banana" Then
Application.Visible = True
Unload Me
Else
TextBox1 = ""
TextBox2 = ""
MsgBox "wrong details"
End If
End Sub
and show form
Private Sub Workbook_Open()
Application.Visible = False
UserForm1.Show
End Sub
No comments:
Post a Comment
THANKS FOR YOUR SUPPORT