On a form . . .

VB Code:
  1. Option Explicit
  2.  
  3. Public i As Integer
  4.  
  5.  
  6. Private Sub cmdOk_Click()
  7.     i = i + 1
  8.     If i = 3 Then
  9.         MsgBox "Sorry, three strikes and your out!"
  10.         Unload Me
  11.         Exit Sub
  12.     End If
  13.     If txtPassword.Text <> strPword Then
  14.         MsgBox "Incorrect password!" & VBA.vbCr & VBA.vbCr & _
  15.             "Make sure caps lock is not on" & VBA.vbCr & _
  16.             " and try again", vbInformation + vbOKOnly, "Incorrect Password"
  17.         Exit Sub
  18.     Else
  19.         'password succeeded
  20.         'put code here to continue after password success
  21.     End If
  22. End Sub
  23. Private Sub cmdCancel_Click()
  24.     Unload Me
  25. End Sub

. . . in a module . . .

VB Code:
  1. Option Explicit
  2.  
  3. Public Const strPword As String = "chickenmcnugget"
  4. 'replace that password with whatever you choose
  5. 'don't forget to password protect your project!!
  6. Sub Get_Password()
  7.     frmPword.Show
  8. End Sub

. . . and here is the form . . .


Good luck !


(I created that form in ExcelXP so you can import it directly into your project)