Skip to content

How to Remove VBA Password from Excel Workbook? (Updated 2022)

Have you been trying to remove VBA password from Excel workbook, but you’ve been unsuccessful? Users are going to have a terrible time with it since it won’t allow them to read or change Excel VBA scripts until they input the right password or remove the VBA password from the Excel file. This is a huge problem for users. For this reason, it is also pretty beneficial for the developers to preserve password protection on the VBA projects.

This article is for you if you have found yourself in a scenario where you have forgotten your VBA password in an Excel file and wish to remove VBA password from Excel workbook. If this describes your circumstance, then continue reading.

You will find both a manual that will assist you to remove VBA password from Excel workbook with the Hex Editor. The automated tool will assist you in resetting your VBA password in just a few simple clicks.

What is a VBA File?

Visual Basic for Applications is the file extension used by Microsoft Office and other products that make use of VBA. This file also contains the Visual Basic source code. In addition, it’s a file format for extending Microsoft Office’s capabilities. Because of this, the vast majority of users encrypt their important documents. There will thereafter always be a chance that you misplaced or forgot the password. As a result, the only way to remove VBA password from Excel workbook is by a fully manual process, which we will cover in this post. First, let’s think about this fictitious forum scenario:

“I can’t open my Excel file because I can’t remember the VBA password. Despite the fact that it holds all of my office’s most important files, nobody was using it. I, too, have attempted several times to access the Excel file in question and remove vba password from excel workbook only to be met with an error notice each time. Would you mind giving me some advice on how to best address this problem?

How to Remove VBA Password from Excel File with Hex Editor?

There are two distinct procedures that you have to carry out based on the file extension of the Excel file that you are working with.

In the event that you own an XLSM file, you will need to carry out the processes that are listed below:

  1. First, use 7Zip or WinZip to convert your.xlsm file to file, and then open the resulting file.
  2. Now, using either WinZip or 7Zip, open the ZIP file, and go to the xl folder within.
  3. You may get the VBAProject.bin and VBAProject.bas files from this location. Move the file outside of the archive using the drag-and-drop method, and check to see that the archive folder is still active.
  4. Launch Hex Editor and go to the location of the VBAProject.bin or VBAProject.bas file.
  5. Find all instances of the text “DPB” and change it to “DPX” to remove VBA password from Excel workbook.
  6. After making modifications to this file, be sure to save it and then re-insert it into the original folder using drag and drop.
  7. After that, you will need to change the file extension back to.xlsm and then compress all of the files into a new Zip file.
  8. Excel should now be opened to the.xlsm file. When you attempt to open the file, there is a possibility that you may be presented with an error notice. To continue, please confirm your actions by clicking the Yes button to unlock Excel file password protected.
  9. To open the VBA editor, press the Alt and F11 keys simultaneously. Unexpected error 40230 will now be shown on your screen. To continue, you must first click the OK button.
  10. Select the VBAProject Properties… option that appears when you right-click on the VBA project that requires a password. Make your way to the Protection tab, then de-select the option labeled “Lock project for viewing,” and finally, choose the “OK” button.
  11. At this point, you should dismiss the window after saving the.xlsm file to remove VBA password from Excel workbook.

Also Read: How to Export Gmail Emails to PST Format using Outlook?

How to Unlock VBA Project Password Excel XLS Workbook?

  1. Open the file using the HEX Editor as your starting point to remove VBA password from Excel workbook.
  2. The second step is to locate the phrase “DPB=”, replace it with “Dbx=”, and then save the file.
  3. Now, launch Microsoft Excel and open the file. If you get the following error message: “The project file ‘D;/ProtectedVBA.xls’ includes invalid key’Dpx,'” take appropriate action. – If you are prompted with “Continue Loading Projects?” choose Yes in order to go on.
  4. The next thing you need to do is open the VBA editor, and when you see the message “Unexpected error (40230),” click the OK button.
  5. After the process is finished, right-click on the file, go to its properties and then choose protection from the menu that appears. After that, you should remove the passwords and deselect the Lock Project checkbox on the viewing box.
  6. Provide a new password after you have double-checked the previous one to remove VBA password from Excel workbook.

Also Read: Why Body of Email Not Showing in Outlook 2021?

These are the actions that need to be taken for free in order to remove VBA password from Excel workbook. By following these steps, you will be able to quickly and simply remove the password security that was placed on your VBA project. However, there is a possibility that some people may find this procedure to be quite difficult.

Leave a Reply

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