Share via

How to unlock Excel workbook and worksheet when password is lost

Chavan, Chetan 0 Reputation points
2026-03-26T08:24:03.1866667+00:00

Dear Sir,

I have created excel workbook with some conversion of input data using VBA macros. and it was locked using password for VBA project, Worksheet and Workbook level protection also.

Now, i changed the laptop and I have the same file but I forgot the password here , how to unlock that sheet as i want to change some references in code as welll as i need to unlock worksheet and workbook also.

Please advice workaround way if any. Unfortunately, i forgot my password here

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments

2 answers

Sort by: Most helpful
  1. Nam-D 3,395 Reputation points Microsoft External Staff Moderator
    2026-03-26T11:39:41.92+00:00

    Hello @Chavan, Chetan,

    From the information you shared, I understand that you are trying to change or remove the protection on an Excel worksheet because you do not remember the password.

    Currently, Excel does not provide any supported method to view, recover, remove, or reset a worksheet protection password when it is forgotten or unknown. If the password cannot be retrieved, the only supported solution is to recreate the content in a new worksheet or workbook.

    While there are community discussions and third‑party tools available online, please be cautious with them. These tools and methods are not authorized or supported by Microsoft, and using them could potentially lead to data corruption, privacy risks, or security issues.

    If you need any additional questions or concerns, please feel free to let me know. I am looking forward to hearing from you.

    0 comments No comments

  2. Q&A Assist
    2026-03-26T08:24:17.4033333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Excel workbook, worksheet, and VBA project protection cannot be removed without the original passwords.

    For worksheet and workbook protection:

    • Protection can only be removed by using the correct password. For a protected sheet, use Review > Unprotect Sheet and enter the password if prompted. For a protected workbook structure, use Review > Protect Workbook (which acts as Unprotect when protection is on) and enter the password.
    • If the password is forgotten, it cannot be recovered by Excel. The documentation explicitly states that if the password is forgotten, the sheet or workbook cannot be unprotected and Microsoft cannot retrieve the password.

    For programmatic unprotection (VBA/.NET):

    • The Unprotect methods for worksheets and workbooks (VBA or Interop) also require the correct password. For example, in VBA:
        ActiveSheet.Unprotect "yourPassword"
        ActiveWorkbook.Unprotect "yourPassword"
      
      and in .NET Interop:
        ((Excel.Worksheet)Application.ActiveSheet).Unprotect("yourPassword");
        ActiveWorkbook.Unprotect("yourPassword");
      
    • If the correct password is not supplied, these methods either prompt for it or fail. They do not bypass protection.

    There is no supported Microsoft workaround or tool to unlock a protected workbook, worksheet, or VBA project when the password has been lost. The only supported approach is to use the correct password or, if available, revert to an earlier unprotected copy or a copy where the password is known.

    Going forward, the guidance is to store passwords in a safe place because they cannot be retrieved or reset by Microsoft once lost.


    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.