This article will tell you how to unprotect an excel spread sheet without having the password
In case of a password protect worksheet you are unable to Edit the data on the Excel Sheet. If you do not Remember the Password or do not know the password to unprotect the sheet just follow the below simple steps.
Press ALT + F11 or click on View Code in Developers Tabs
In the Above White Space Enter the below Code. Do not change the code just copy paste:
Sub PasswordBreaker() 'Breaks worksheet password protection. 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
Now Click on the Run Button or press F5:
And there you go the sheet is unprotected for you now. Also you would be getting a message in the pop up window.
This Message is contains the password which can be used to unprotect the other sheets in the same workbook.
Update:
Download sample file: PasswordBreaker
Also read:
please provide sample file.. code is not working.
Hi Upadhyay, thanks for the comment… enclosed example file with vba code… please check it…
sir this code not in work pls verify
Hi Manohar, thanks for the comment… enclosed example file with vba code… please check it…
What if the VBA is also protected, how can you put the code
Hi Ray… Thanks for the comment…..
In case the VBA Project is protected… you will need to copy the code to some other excel file and run the macro from the excel where the sheet is locked.
Go to Developer Tab > Macros > Select the macro you copied to the other excel file and click on > Run
Let me know if you have any questions. Thanks…
Hi I cannot find the “enclosed example file with the new VBA Code”, the code posted above doesn’t work for me either
Hello Heinz,
The link in the article is operational. However you can download the file from the link : PasswordBreaker.zip
Hi sir,
This side warish
Sir you are share with vba youtube
Complete vba
The example does not work and the file you posted to download does not work.
code works to unprotect a password protected worksheet (active). can you please tell me what is the error you are getting, a screenshot of error would be helpful.
The Code also not working in my case. I’m trying to edit a password protected worksheet. When I run the code its continuous working and excel gets NOT RESPONDING
Thanks so much! I followed all the steps and typed in all the codes word for word exactly. And surprisingly it WORKED!!
Thanks for posting this! Did exactly as stated and it worked!
You are the best, thank you so much for sharing this awesome method, it worked perfectly right
Thank you SO much. This totally worked. One suggestion, why not just put the text in so people can simply copy and paste it as opposed to making people type it out. Anyways, thank you again.
file is not available. Please provide the file
It worked !! but there is a data loss in the sheet. So why there is a data loss? I see half of the records gets removed after running this.
data loss may be due to file corruption,