Skip to main content

UNPROTECT ANY EXCEL WORKBOOK IN JUST 5 SIMPLE STEPS


The article shows how to unprotect Excel spreadsheet without password if you forgot or misplaced it. 

How to unprotect Excel sheet without password:


If you need to edit a password protected sheet but you cannot remember the password, try to unlock that Excel spreadsheet by using the following method:

Unlock Excel spreadsheet with VBA code (for Excel 2010 and lower)

If you are using Excel 2016 or older version, you can unlock a password-protected sheet with the following macro.
Download the code file from here!

Step 1: Open your Excel document and switch to the password-protected sheet (it should be active when you run the macro).

Step 2: Press Alt + F11 to open the Visual Basic Editor.

Step 3: Right-click the workbook name on the left pane (Project-VBAProject pane) and select Insert > Module from the context menu, or press F7; In the window that appears, paste in the following code:
-------------------------------------------------------------------------------------------------------------
Public Sub AllInternalPasswords()
'Breaks worksheet and workbook structure passwords.
'Bob McCormick probably originator of base code algorithm
'Modified for coverage of workbook structure / windows
'passwords and for multiple passwords
''Reveals passwords NOT "the" passwords
Const DBLSPACE As String = vbNewLine & vbNewLine
Dim Mess As String, Header As String
Dim Authors As String, Version As String
Dim RepBack As String, AllClear As String
Dim PWord1 As String
Dim ShTag As Boolean, WinTag As Boolean
Dim w1 As Worksheet, w2 As Worksheet
Dim i As Integer, j As Integer, k As Integer, l As Integer
Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer
Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer
Application.ScreenUpdating = True
Header = "Unprotecting"
Version = "Click OK"
With ActiveWorkbook
WinTag = .ProtectStructure Or .ProtectWindows
End With
ShTag = False
For Each w1 In Worksheets
ShTag = ShTag Or w1.ProtectContents
Next w1
If Not ShTag And Not WinTag Then
Mess = "This Workbook Is Password Free"
MsgBox Mess, vbInformation, Header
Exit Sub
End If
MsgBox Mess, vbInformation, Header
If Not WinTag Then
Mess = "This Will Take 2 Minutes" & DBLSPACE & _
"Proceeding to unprotect sheets." & DBLSPACE & _
"Please Wait..." & DBLSPACE & Authors & Version
MsgBox Mess, vbInformation, Header
Else
On Error Resume Next
Do 'dummy do loop
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
With 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)
If .ProtectStructure = False And _
.ProtectWindows = False Then
PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _
Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
Mess = "You had a Worksheet Structure or " & _
"Windows Password set." & DBLSPACE & _
"The password found was: " & DBLSPACE & _
PWord1 & DBLSPACE & "Note it down for " & _
"potential future use in other " & _
"workbooks by same person who set this " & _
"password." & DBLSPACE & _
"Now to check and clear other passwords." & _
Authors & Version
MsgBox Mess, vbInformation, Header
Exit Do 'Bypass all for...nexts
End If
End With
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
Loop Until True
On Error GoTo 0
End If
If WinTag And Not ShTag Then
Mess = "Only structure / windows protected with " & _
"the password that was just found." & _
AllClear & Authors & Version & RepBack
MsgBox Mess, vbInformation, Header
Exit Sub
End If
On Error Resume Next
For Each w1 In Worksheets
'Attempt clearance with PWord1
w1.Unprotect PWord1
Next w1
On Error GoTo 0
ShTag = False
For Each w1 In Worksheets
'Checks for all clear ShTag triggered to 1 if not.
ShTag = ShTag Or w1.ProtectContents
Next w1
If Not ShTag Then
Mess = AllClear & Authors & Version & RepBack
MsgBox Mess, vbInformation, Header
Exit Sub
End If
For Each w1 In Worksheets
With w1
If .ProtectContents Then
On Error Resume Next
Do 'Dummy do loop
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
.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 Not .ProtectContents Then
PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _
Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
MsgBox Mess, vbInformation, Header
'leverage finding Pword by trying on other sheets
For Each w2 In Worksheets
w2.Unprotect PWord1
Next w2
Exit Do 'Bypass all for...nexts
End If
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
Loop Until True
On Error GoTo 0
End If
End With
Next w1
Mess = AllClear & Authors & Version & RepBack
MsgBox Mess, vbInformation, Header
End Sub

-------------------------------------------------------------------------------------------------------------
Step 4: Press F5 or click the Run button

Step 5: Now, a popup massage will appear on the screen click “OK” 3 times and wait 2 minutes; and Your Excel Sheet is Password Free.
Download the code file from here!

Know about us - https://thetaxsupport.com
You can find more articles on at https://thetaxsupport.com/blog
You can find tutorial videos on at https://www.youtube.com/c/vipinsanger

Comments

Popular posts from this blog

4 Quick Tips to Stop Overspending..!!

The Tax Support Y ou may are during a situation where you've planned to save lots of money rather than overspending it. you'll have planned to shop for only what's necessary, stop eating out and control the urge to online shopping. Unfortunately, at the top of the month, you've ended up spending quite what you've thought you'd. Stopping overspending isn't as easy because it seems to be and if you actually want to save lots of money, read on to understand four quick and straightforward tips and tricks. Why shouldn't you overspend? In spite of the very fact that overspending may be a 'subjective' term, most folks tend to spend quite what we should always. Though it's going to not be easy to believe that you're overspending, the sooner you realize the very fact , the better it gets in controlling your urge to spend more. If you're one among those that purchase items because they're hooked in to those, ask yourself whether ...

All about the New Income Tax Slabs and Rates

For the first time ever, the Union budget 2020 presented by the Finance Minister came up with two tax slabs and rates and gave an option to the taxpayers to choose between the two from the financial year 2020-21. While retaining the existing three slab tax rates, it introduced a new six-slab tax rate. On the budget day, as news started trickling in on the tax front, the initial euphoria evaporated and gave rise to confusion and disappointment. The confusion was reinforced when I got a call from one of my colleagues recently, asking me which regime was beneficial as it was the time for the annual investment declaration in the organisation. Old or New? Taxes, deductions, exemptions and compliances are by themselves something of a rocket science for the average taxpayer. The new rules have only increase the confusion for the income tax taxpayers. So let us try to figure out which tax regime is better. The table (for taxpayers who are less than 60 years of age) compares th...

How to know in which income tax slab you fall?

As your income level increases, income at different levels will be taxed at different rates which are called the slab rates. To know how much is your tax liability in FY 2019-20, it is very important to know which income tax slab you fall in. While doing your tax planning for FY2019-20, it is very important to know which tax slab your income falls in. The slab rate in which your income will fall is the rate at which your income will be taxed. As your income level increases, income at different levels will be taxed at different rates which are called the slab rates. *Income tax slabs applicable to the resident individuals below the age of 60 years for FY2019-20. Surcharge is applicable from income above Rs 50 lacs. Health and Education cess at rate of 4% will be added to the income tax payable in all cases. Rebate of Rs 12,500 is available for an individual having net taxable income of up to Rs 5 lacs under section 87A. Suppose your gross total income is Rs 15 lacs in FY...