CODE
Private Sub cmdLog_Click()
Dim var1 As Integer
Dim var2 As Integer
If txtName.Text = "SEAH GIAP SIANG" Then
If txtPassword.Text <> "1234" Then
Select Case var1
Case Is <= 3
MsgBox "The password is incorrect", vbExclamation, "INCORRECT PASSWORD"
var1 = var1 + 1
Case Else
MsgBox "You have entered the wrong password too many times,the program will now terminate.", vbCritical, "TERMINATE THE PROGRAM"
Unload Me
End Select
Else
frmWelcome.Hide
'frmSplash.Show
End If
Else
Select Case var1
Case Is <= var2
MsgBox "The name is incorrect", vbExclamation, "INCORRECT NAME"
var1 = var1 + 1
Case Is <= var2
MsgBox "You have entered the wrong name too many times, the program will now terminate.", vbCritical, "TERMINATE THE PROGRAM"
End
End Select
End If
End Sub
** Edit **