Hi how would i tell if a command was clicked 3 times.I am trying to make a password protection for my app.I want it to check if the user clicks the command 3 times with the wrong serial it ends.Can someone post an example code thanks.
Printable View
Hi how would i tell if a command was clicked 3 times.I am trying to make a password protection for my app.I want it to check if the user clicks the command 3 times with the wrong serial it ends.Can someone post an example code thanks.
VB Code:
Option Explicit Private Sub Command1_Click() Static x As Integer 'Static variables store values as modular variables, but just inside 'the sub/function where they are declared x = x + 1 If Text1.Text = "password" Then MsgBox "Ok, come in" Else MsgBox "Wrong Password" End If If x >= 3 Then Unload Me End Sub
thank you