Know VBA Code to Unlock a Locked Excel Sheet 2016 / 2013 / 2010 Effortlessly

Ashwani Tiwari | Modified: April 19th, 2021 | Technology

What are the ways to learn the VBA Code to unlock a locked Excel sheet 2016, 2013, 2010?

Microsoft Excel is widely used by users to store crucial information. But, then users keep their important safe and secure they protect it with the help of password. This is the reason due to which, on most of the workplaces Excel worksheets containing data are secured from passwords.

It is a normal business requirement of the users to share worksheets with other people and send it to some other user outside the organization. In all such situations, users always want to protect their worksheets from being changed like deleting and moving of data. Therefore, users always lock Excel sheet with password.

But, this might happen that you are in a situation where you either forget or lose password of protected Excel sheet. At this point, what you will do to get everything in your hands? There are number of users who look for the VBA code to open the file. Therefore, to make this task easy for the users, multiple ways to unprotect Excel sheet. After this, it becomes easy for you to modify the document without type of restriction.

Note: You can use an expert-recommended solution which is capable of resetting the password on a VBA project and generate a new one to unlock the file.

How to Find VBA Code to Unlock a Locked Excel Sheet 2016, 2013, 2010?

The most common and frequent search over the internet is how to use VBA code to unlock a locked Excel workbook? In order to know about the same, go through the section below:

In the case of Microsoft Excel 2010 or below versions, you can unprotect the password-protected Excel sheet with VBA code by following the steps below:

  1. To start the process, you need to open Excel document and move to locked sheet

Note: Password-protected sheet must be active to run macro.

2. After that, press Alt + F11 key in order to open Visual Basic Editor.

3. Then, right-click on name of the workbook from the left pane. From the context menu, choose Insert >> Module option for VBA code to unlock a locked Excel sheet 2016, 2013, 2010, etc.

4. Here, a window will appear. Simply paste the code given below in that window:

5. After that, you can either press F5 key or click on the Run button from the toolbar and wait for few minutes

6. Now, the macro will provide you the cracked password that is not actual password but work for sure. It is some combination of A’s and B’s. There is no need to remember this fake password or use it anywhere else. You have to click on the OK button simply and your Excel sheet will be unlocked.

to remember:

  • In the case of multiple locked sheet in Excel file, you need to run the macro for each sheet one by one to unlock it.
  • If you are using the latest versions i.e., Excel 2013 / 2016, you have to first save the document in Excel 97-2003 workbook (*.xls) format. After that, run this macro and unlock it. When your file is unlocked successfully, save it in XLSX format.

How to Unlock a Locked Excel Sheet 2016 Alternatively?

Another possible way to get the VBA Code to unlock a locked Excel sheet 2016, 2013, 2010 etc. is you can copy protected Excel sheet content to unprotected sheet. To do the same, follow the steps mentioned below:

1.First of all, open your Excel file and got to the sheet, which is password protected

2. After that, choose the cell A1 and hold Shift + Ctrl + End key to choose all cells containing content in the worksheet

3. Now, to copy the selected content, hit Ctrl + C key or you can right-click on the cell and choose Copy option

4. It’s time to create a new worksheet. To do the same, hit Ctrl + N key and new blank sheet will open

5. After that, in the blank worksheet, you need choose the cell A1 and press Ctrl + V key to paste all the content in the new worksheet.

After following all above steps carefully, you can use new Excel sheet without any restriction. However, while using this method, keep in mind that if Select locked cells and Select unlocked cells actions are closed in the locked sheet. In addition, if there are any external links in the Excel sheet, you have to rebuild all of them.

Extra Tip- VBA Code to Unlock Locked Excel Sheet 2016, 2013, 2010

A user either copy data or use VBA code to open the Excel sheet 2016. But both of them are not foolproof solutions. Thus, in order to have a seamless and direct approach to remove password from Excel file, use VBA Password Breaker tool.

It is one of the simplest and quick method to unlock Excel sheet. Apart from all this, the application is capable to remove multilingual password also. A user can unlock .doc, .dot, .xls, .xla, .mdb file type of Excel file. It can be installed on any version of Microsoft Windows OS.


Most of the users are searching for VBA code to unlock a locked Excel sheet 2016, 2013, 2010, etc. To solve this problem of users, several ways to to unlock a protected Excel sheet are discussed above. It is the most common situation that users lost their workbook password and then search for solution. Thus, in all possible scenarios, this guide will be really helpful.