How to Unprotect Microsoft Excel Sheet without Password
This morning, a colleague came with an excel file that could not be edited, because the sheet was protected by its creator. My friend asked to unprotect the Microsoft Excel sheet, because he didn't know the password. When trying to edit it, a warning will appear like this.
or another characteristic of a protected sheet is if we look at the tab review then there will be an icon unprotect Sheet
![]() |
Unprotect Sheet Icon |
The file can only be edited if we know the password for the Unprotect Sheet. I just realized that I haven't played around with protected Excel sheets for years :D. In the past, I usually used Open Office to edit protected files, from the experiment, it turns out that excel protection does not apply in other programs such as Open Office, Libre Office, etc.
Incidentally, the computer I use has not been installed Open Office/Libre Office, it seems to take a long time if I have to download and install the program. So with the help of Google, I finally found a way to unprotect the Excel Sheet using VB (Visual Basic) Script.
The following is a step by step Unprotect Microsoft Excel Sheet using VB Script:
- Open the protected excel file
- Press the combination key "ALT+F11″
- Click Insert > module
- copy and paste the following code:
Sub InternalPasswords()
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
ActiveWorkbook.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)
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 ActiveWorkbook.ProtectStructure = False Then
If ActiveWorkbook.ProtectWindows = False Then
If ActiveSheet.ProtectContents = False Then
Exit Sub
End If
End If
End If
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
End Sub
5. Click on the sheet or workbook that we want to open the password for
6. Click Macro > Show Macro > Internal Password > Run
7. Wait for a while (depending on the size of the file)
8. If the process is complete, then you can edit the file freely. To check whether the file is still protected, you can also see it in the Review tab, then the icon Unprotect Sheet has changed to Protect Sheet.
Hopefully it will be useful if one day you forget the sheet protection password or need to edit a file that turns out to be protected.
->
thanks gan very helpful 🙂
thank you very much ... work gan
both..thanks for visiting 🙂
both..thanks for visiting 🙂
great.....successful
Just sharing, the way I do it is only 3 steps, check here, http://binderone.blogspot.com/2015/02/3-step-open-sheet-cell-protection.html or youtube https://www.youtube.com/watch?v=gpQjmdTLoI0
Thanks ,....
Trimks is very helpful
my other writings are at http://www.comparazi.com
manztabb
Thanks a lot gan...help our work
thanks....simple and effective
What if VB is also in the password?
gan mine can't insert module cz in VB it still has password kira" gmana how?
This is to remove the protection directly, what if you want to know the password... can you use the method above?
please, thank you your article is very helpful for my work. continued success
This comment has been deleted by the blog administrator.
This comment has been deleted by the blog administrator.
Why after clicking insert, the module is not active?
This comment has been deleted by the author.
nice tutorial. thank you
If what is protected is the vb project, is there any way gan?
that's because the vbProject is also protecked.
thanks gan (y) 🙂
matur nuwun kang....helped by the knowledge that you share....salut n success bwt akang...
How come mine is just running around,
I've tried the same method but the content is different and it's still running...
(office position 2016)
thank you so much.... my files can be edited without asking to be resent by suppliers who are stingy in providing data, using all the protection....heheeee
Thank you...
Thank you so much jazakalloh khairan katsiraa..... so helpful. ikah muh bjr
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
If the mudulnya can't do it bro
Great, very helpful
it works.
Thank you.
very helpful
Very useful knowledge, thanks gun I have tried it very helpful.
Thanks Gan. Very useful
Great gan...I tried and it worked. thanks.
o yes, stop by my blog once in a while...
http://topafiliasiindonesia.blogspot.co.id/
thank you very much mas very helpful 🙂
ok gan...steady work...thanks a lot
thank you very much mas....success always
gan, ask ya, if the module insert can't be opened gmn gan?
@Akhy Abdoen Jamiel: Passworded? Try opening it using libre office if you have it
Every time it runs .. not responding continues gan .. how is the solution?
SAYAMAH CAN'T DO IT
REALLY HARD OR THE FILE IS TOO BIG
sorry gan can't work on my computer. what is the solution?
sorry gan can't work on my computer. what is the solution?
great...tq
thank you very much friend
very helpful
Can't module, can't click either.. what's wrong?
because the VBA is still protected, so the module can't be used.