Fixing the problem of the form loading and allowing 3 more tries is just a scope problem. But you have to decide whether the user has to close the whole program to try again, or whether you're going to allow it to work the way it does now. You can't stop one user from trying to log in after 3 tries, but allow another user to try to log in at that point - the computer doesn't know who's typing.

To keep the program from allowing more than 3 tries, define your counter variable in a module
Code:
Public intCounter As Integer
In the code where you show the login window (probably frmMain)
Code:
If intCounter < 3 Then
  frmLogin.Show 'use whatever the real form name is
Else
  MsgBox "Sorry, you've had 3 tries.",vbCritical
End If