Articles Office How to Unlock Excel When File is Locked for Editing

How to Unlock Excel When File is Locked for Editing

Updated: By Yvonne Keller

When you found the Excel file locked for editing, how can you unprotect the Excel file and unlock the Excel file to edit? Due to the Excel file locked for editing so that the password must be required to unlock the Excel file. If you forgot the password and have no idea to unlock the locked Excel file, refer to the following ways to unlock the editing-protected Excel files.

2 Ways to Unlock Excel file without Password:
Way 1: Remove Editing Restriction with Workbook Unprotect Tuner
Way 2: Manually Unlock Locked Excel Worksheet for Editing

Way 1: Remove Editing Restriction with Workbook Unprotect Tuner

For many people, there may be quantities of Excel Worksheets are locked for editing, which makes it much more difficult to unlock the Excel sheets or Workbooks one by one manually. Luckily, we get one alternative tool to handle this annoying work. Cocosenor Workbook Unprotect Tuner is going to remove the editing restriction for the protected Excel Workbook and Worksheet with just one click. It would be more efficient to unlock a bunch of Excel files that are locked for editing.

If the Excel files are locked for editing by an opening password, you probably need Cocosenor Excel Password Tuner to help you recover the Open password of the locked Excel file.

1. Download and install the Cocosenor Workbook Unprotect Tuner on your working computer.

free trial

2. Run it and click Open to select the MS Excel file locked for editing.

click Open button

3. And then click the button of Remove Password.

click remove password

4. You would be told that the editing protection of Worksheets or workbooks is removed from your locked Excel file.

remove editing protection from Excel

Way 2: Manually Unlock Locked Excel Worksheet for Editing

They are two possible optional methods for you to unlock or remove the editing protection if the Excel Worksheet is locked for editing. Method-1 requires a Zip Archiver (7 zip, Bandizip, WinRAR, etc.) to help us disable the Worksheet protection. Method-2 is going to remove the editing protection by VBA code. Both two methods aim to unlock/remove the Excel Worksheets from being locked for editing.

Method-1: disable the protection of editing-locked Excel Worksheet

Step-1: Locate where the locked Excel file. Right-click it and rename the extension (.xslx) with .zip file type.

rename excel file type

Step-2: Then use the Zip Archiver you installed on your computer to open the archiver file.

Step-3: Expand the folder of xl. Then navigate to the folder of Worksheets. Inside, you will find an XML document named sheet1.xml. Right-click to edit it.

archive

Step-4: The file will be opened by the default program, never mind. You need to find the content text as shown below and delete it from the file. After deleting, save the changes and close the windows and program.

disabled editing protection

Step-5: Finally, switch the extension (.zip) of the file back to .xlsx. Then open the locked Excel file with Microsoft Excel, you will find the Excel Worksheet is not locked for editing anymore.

Method-2: Unlock the locked Excel Worksheet by VBA code

Step-1: Open the Excel file that is locked for editing.

Step-2: Right-click the sheet and then select the option of View Code. Or press the key Alt and F11 at the same time from the keyboard.

view code

Step-3: Then enter the VBA code (see code at the end of this page) into the window of the protected Excel sheet.

vba code

Step-4: Press the key of F5 to run the process and check the result. If necessary, click the Run button when a small window coming up. You can close the window and start to edit your Excel Worksheet. The editing protection would be already removed from the locked Excel Worksheet.

VBA code:

Sub UnprotectSheet()
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)
ActiveWorkbook.Sheets(1).Select
Range("a1").FormulaR1C1 = 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

Related Articles