Sponsored
    Follow Us:
Sponsored

We many times receives excel files from various sources. Sheets of  which are password protected by the author of the file. Sometimes we need to change the content of the file to suit our requirements but we will not be able to  make the changes if the excel sheet is password protected. This document will tel 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  Excel2

Choose the Sheet No. or Sheet Name which you want to un-protect and then In the Above White Space Enter the below Code (In Italics).  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: Excel3

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.

 Excel4

Source – University of Wisconsin- Green Bay- USA

Sponsored

Tags:

Join Taxguru’s Network for Latest updates on Income Tax, GST, Company Law, Corporate Laws and other related subjects.

45 Comments

  1. Vishal Patel says:

    Two Steps:
    1) Enable Macro (Go to File > Options (More > Options) > Trust Center > Click Button “Trust Center Settings” > Macro Settings > Select Enable All Macros radio selection > click OK > save file and close excel file)
    2) Unzip downloaded ITR excel again and Open excel file and fill your ITR.
    Hope “Calculate Tax” button will work now.

  2. Chinmoy Mitra says:

    Sorry, this does not work. When I try to select a worksheet in visual basic editor, I am again asked for the password, so it simply defeats the purpose of this tutorial. Please try it yourself before posting such ideas. Thanks

  3. alank says:

    I had syntax error several times.

    Finally

    Success was when I did the following:
    Copy the program code into word, then change to Italics. Copy and paste into the F-11 white space, click on run, and it should give you a title, then it will spin for a while, eventually the pop-up box will come up with the passcode.

  4. Denis Gladysh says:

    Actually, it’s not difficult to remove protection from set for Excel sheets.

    And use either document decryption services if it is Excel 97-2003 or software supporting video cards if it is Excel 2007-2013 to search for the Password to Open.

    Though good software instantly finds or removes both passwords protecting sheets and VBA passwords.

  5. V Sivaraman says:

    Yeh….
    It worked.
    But will work only if the sheets are pwd protected.
    If the Macro project is protected like ITRs it will not.

    This will help only non-IT professionals like us who find problem by forgetting the pwd

    Sivaraman

  6. Ashish Bhalara says:

    It’s working fine but how to write code in Micro protected worksheet, because generally pw protected file is also protec Micro so where to write this code to run?

  7. Joyab Khan says:

    Please copy & paste this edited formula

    Sub PasswordBreaker()

    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

    Exit Sub
    End If
    Next: Next: Next: Next: Next: Next
    Next: Next: Next: Next: Next: Next
    End Sub

  8. FAHEEM says:

    ITS WORK
    first time i paste the code and press f5 shows error
    but i copied to it on ms-word
    and italic it
    than i copied and paste vb programme and press f5
    now its worked and get the unlocking password after taking few seconds of processing

  9. Somnath says:

    Reply to All:……………………………..

    Kindly do the following:

    Step 1: Copy paste the code in the window as instructed.
    Step 2: Delete the (‘) before (Line 2 – Breaks worksheet password protection.) and again type it
    Step 3: Delete (“) in (MsgBox “One usable password is ” & Chr(i) & Chr(j) & _ ) and again type it.
    Step 4: Check that (Breaks worksheet password protection.) is in green
    Step 5: No other lines are in red
    Step 6: Run (F5)

    THE CODE WORKS…………..Thanks to the code writer

  10. Pooja says:

    Please send the details
    How to Enable Macros in Microsoft Excel For Income Tax Return (ITR)

    How to rectify, calculate & aviod interest on TDS defaults

    Download ITR-1 (SAHAJ) & ITR-4S (SUGAM) Return Preparation Software

    How to Combine VLookup and Match formulas in Microsoft Excel

    FAQ on Registration on ITD e-filing website & How to upload ITR

  11. Ankur says:

    I have tried on trial & error basis. I have protected one and only sheet in my excel file by a password. After again opening the same, tab of “show link” is disabled and thus, not able to proceed further.

  12. Babu Sivaprasad says:

    I’ve tried the a above according to the instructions given. But it does not work. An error message is displayed. Please ensure the correctness of the codes and provide instructions. Thank you.

  13. GP says:

    Complie Error

    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)

  14. Prakash Agrawal says:

    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

  15. V Sivaraman says:

    Dear Sir,
    the following lines throw compilation error.

    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

    and the same is displayed in “RED”.

Leave a Comment

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

Sponsored
Sponsored
Ads Free tax News and Updates
Sponsored
Search Post by Date
December 2024
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031