Hello, i would like to allow the user to press Retry button from msgbox only 3 times. I just don't succedd to do it, here is my code if anybody can help me?
Private Sub cmdValid_Click()
Dim Response As Integer
If txtPassword.Text = txtPassword.Tag Then
MsgBox "You've passed security!", vbOKOnly + _
vbExclamation, "Access Granted"
Else
Response = MsgBox("Incorrect password", vbRetryCancel _
+ vbCritical, "Access Denied")
If Response = vbRetry Then
txtPassword.SelStart = 0
txtPassword.SelLength = Len(txtPassword.Text)
Else
End
End If
End If
txtPassword.SetFocus
End Sub