KlausW
Active Member
- Joined
- Sep 9, 2020
- Messages
- 458
- Office Version
- 2016
- Platform
- Windows
Hi I am using this VBA code found here on Mr. Excel to run a macro after I have entered the password. Now I would like the code to find the password in cell H1.
Some who can help, any help would be appreciated.
Best regards Klaus W
Some who can help, any help would be appreciated.
Best regards Klaus W
VBA Code:
Sub MPW()
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