Help with code...EASY...
Posted by Steve on July 10, 2001 8:34 AM
I have this code that is loaded when form is opend, I need it to not open after an incorrect password is presented. The form is called "update".
Private Sub Form_Load()
Dim MyPassword
MyPassword = InputBox("Please enter password", "Password Prompt", "********")
'hardcode password
If MyPassword = "password" Then
MsgBox "Access Granted", vbInformation, "Access"
'call macro
Exit Sub
Else
MsgBox "Access denied", vbCritical, "Error"
Exit Sub
End If
End Sub
Thanks!