Unprotect the sheet

  • Thread starter Thread starter trybharath
  • Start date Start date
T

trybharath

Hi,
I want to unprotect the Excel Sheet, I have lost my password. Is there
is any method of unprotecting the Excel sheet with the criteria that
password is not known? If so please give me the code for that...+

Regards,
Shreeram
 
Hello

I find a fast method in a other forum

Sub Test_3()
'_Méthode 3 expéditive sans boucle
Worksheets("Feuil1").Select
W_Timer = Timer
With ActiveSheet
.Protect vbNullString, , True, , , , , , , , , , , , , True
.Unprotect vbNullString
W_Timer = Timer - W_Timer
If .ProtectContents Then GoTo E1 _
Else GoTo E2
End With
FP: On Error GoTo 0: Exit Sub
'=
E1: MsgBox "mot de passe non trouvé": GoTo FP
E2: MsgBox "mot de passe trouvé " & vbCrLf _
& "en " & CInt(W_Timer) & " secondes": GoTo FP
End Sub

J a c q u e s
 
Back
Top