How to Unprotect a password protected worksheet in Excel
What you do when you want to edit or modify an excel sheet but all the tabs are grayed out and you are not able to do anything...
this is because the excel sheet is protected with password by the owner in order to prevent people to play with it.
I will show you an easy way how to remove the password,
here is how it look like when you have a protected sheet
as you see the tabs and buttons are grayed out indicating you can not do any changes.
in order to Unprotect it you have to go to Review Ribon and click on Unprotect
in order to Unprotect it you have to go to Review Ribon and click on Unprotect
but it will ask for a password!
so what you do if don't know the password??? here is the solution!
step one: press Alt+F11 on your keyboard ( one some laptops you have to press ALT+FN+F11) in order to open the visual basic code window, and then double-click on sheet1
and then copy this code below without changing anything just copy and past to the window as shown below :
Sub PasswordBreaker() Dim i As Integer, j As Integer, k As Integer Dim l As Integer, m As Integer, n As Integer Dim i1 As Integer, i2 As Integer, i3 As Integer Dim i4 As Integer, i5 As Integer, i6 As Integer On Error Resume Next For i = 65 To 66: For j = 65 To 66: For k = 65 To 66 For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66 For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 ActiveSheet.Unprotect Chr(i) & Chr(j) & Chr(k) & _ Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _ Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) If ActiveSheet.ProtectContents = False Then MsgBox "One usable password is " & Chr(i) & Chr(j) & _ Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _ Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) Exit Sub End If Next: Next: Next: Next: Next: Next Next: Next: Next: Next: Next: Next End Sub
then click on run icon as below :
you should get a message like this
this means everything is going on plan... you are good to go :)
Post a Comment