Best Way to Remove VBA Password from Excel – Complete Solution


December 5th, 2022 ~ VBA ~ 4 Minutes Reading

Forgetting Excel VBA password is the most common problem faced by users. And if you are looking for a solution to overcome this problem. Then in this blog, we will explain how to remove VBA password from Excel manually. But first, let’s find out what is VBA password if you don’t know.

VBA is a programming language for computers (Virtual Basic for Application) provided by MS Office. The VBA is used to protect the Excel worksheet and projects known as the VBA password.

Now when the user forgets the VBA password, it leads to a problem that the user cannot edit or modify their Excel spreadsheet.

remove vba password from excel

What is the Need Where the User Wants to Remove VBA Password from Excel?

  1. Many times users want to create a duplicate copy of the VBA project in Excel but when the user tries to edit or copy the modules, the Excel file projects ask for a VBA password.
  2. When an employee of an organization left the organization. And the organization team wants to Access the employee Excel sheet which contains the VBA password then they break the Excel VBA password.
  3. When someone sends you an Excel workbook and you are not able to open it because it is password protected.

These are just some of the reasons we have given. But actually, there are many more reasons why users want to remove VBA password from Excel. To solve this problem users are now looking for a manual solution. In the next paragraphs, we have mentioned all the manual ways to unlock Excel VBA password.

Explained Manual Solution to Remove Excel VBA Password

#Solution No 1. Unlock VBA Password via Changing File Extension

  • Open the VBA project file and change the extension from .xlsm to .zip.
  • Open the Zip file with WinZip / WinRar programs by double-clicking.
  • Press on the xl folder.
  • Now, export the VBAproject.bin file and open the file with Hex editor.
  • After that, replace DPB with DPx in the hex editor and save it.
  • Rename the old vbaProject.bin file to the new vbaProject.bin file in the ZIP folder.
  • Now, change file extension from .zip to .xlsm.
  • Begin Visual Basic in Microsoft Excel by choosing Tools >>VBAProject Properties.
  • Select the Protection tab, set a new password, then save it in .xlsm format.
  • Finally, the user can easily open the VBA project file by entering a new password.

#Solution No 2. Excel Password Remover Macro

Users only need to copy and paste the below code into their Excel VBA code window to remove the password from the Excel Sheet.

  1. Click + F11 to open the visual basic editor.
  2. Press the Insert Module option and paste the given code.remove vba password from excel
  3. Click the F5 tab to run the code and break the VBA Module password in the Excel sheet.
  4. Now, you are free to open VBA-protected files without giving any password.

#Solution No 3. Remove VBA Password in Excel Workbook via Hex Editor

  • Firstly, create a new Microsoft Excel XLS / XLSX file using the Hex Editor program.
  • Secondly, set a new password in VBA file, it shortcut is Alt + F11.
  • Save the recently generated file at any location and click the exit tab.
  • Now open a file via Hex Editor and copy each file starting with CMG=…, DPB=… and GC=…
  • Copy the above lines and paste them. Open a file that you want to remove the VBA password from in Hex Editor.
  • Lastly, save the Excel file and exit to unlock the password from VBA projects.
  • Now set a common password that you used in the previous step for the dummy VBA file.

Limitations of Manual Solution

So in the end, we suggest you several manual solutions to remove Excel VBA Password. But these solutions do not work professionally. There are some limitations:

  1. If you have a batch VBA password-protected file, then these solutions take your time and effort because they don’t work in bulk to unlock the VBA password macro password from an Excel workbook.
  2. You need to follow so many multiple steps to remove Excel VBA password, so you will need to know the technicalities to learn all these steps.
  3. After removing the VBA password from Excel, there are very much chances of data loss.


In this article, we have listed many manual solutions to remove VBA password from Excel. If you forget the password, someone sends you a VBA protected file and you need to remove it, then you can try these above-mentioned manual solutions to remove Excel VBA password.

Also Read: Remove MS Access VBA Project Password