I
ianripping
I have this code: -
Sub Unprotect()
Dim Pwd As String
Pwd = InputBox("Please enter password to unprotect this sheet....")
If Pwd = "" Then
Cancel = True
Else
Sheets("AOct").Unprotect (Pwd)
End If
End Sub
It works fine if you enter the correct password, and works fine if yo
press cancel.
My problem is if you type in the wrong password, a debug error appears
I want it so if the password in incorrect, a message comes up sayin
incorrect password.
Any idea's
Sub Unprotect()
Dim Pwd As String
Pwd = InputBox("Please enter password to unprotect this sheet....")
If Pwd = "" Then
Cancel = True
Else
Sheets("AOct").Unprotect (Pwd)
End If
End Sub
It works fine if you enter the correct password, and works fine if yo
press cancel.
My problem is if you type in the wrong password, a debug error appears
I want it so if the password in incorrect, a message comes up sayin
incorrect password.
Any idea's