Password Protection
Hi W,
Please replace my suggested code with the following version:
'=============
Public Sub Tester()
Dim PWORD As String
PWORD = InputBox(Prompt:="Please type the password")
On Error Resume Next
ActiveSheet.Unprotect Password:=PWORD
If Err.Number < 0 Then
MsgBox "The password was not recognised"
End If
On Error GoTo 0
End Sub
'<<=============
---
Regards,
Norman
|