Tips & TricksTroubleshooting

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.
protectsheet-6320984
"the cell or chart you are trying to change is protected and therefore read-only. To modify a protected cell or chart, first remove the protection using the Unprotect Sheet command (Review tab, Change group). You may be prompted for a password""
 

or another characteristic of a protected sheet is if we look at the tab review then there will be an icon unprotect Sheet 
unprotectsheet-2453568
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:

  1. Open the protected excel file
  2. Press the combination key "ALT+F11″
  3.  Click Insert > module
  4. 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.

 

->

49 thoughts on “Cara Membuka Proteksi Sheet Microsoft Excel tanpa password

Leave a Reply

Your email address will not be published. Required fields are marked *

en_USEnglish