Home » Tech » Excel VBA Password Not Working – Perfect Solution

Excel VBA Password Not Working – Perfect Solution

Akshay Vats ~ Published: 29-Mar-2022 ~ Tech ~ 4 Minutes Reading

“I have forgotten the VBA password of the MS Excel File. Even though it contains very important files of my Office and they were not opening as well. I tried many times to retrieve the password from the Excel file when opening it but I was unable to get through as it is showing Excel VBA Password not working. Kindly suggest to me any relevant solution that helps to resolve this problem.”

VBA is an extension for the Visual Basic file used with MS Office suite and any other program like Excel, Word, Access, etc. This file consists of the visual basic source code as well. Moreover, the VBA file is useful in adding functionality to Office applications that are related to the plug-in instance. This file can be opened and edited with Visual Studio. Read the 3 measures to resolve this error in the next paragraph.

3 Measures to Resolve the Error – Excel VBA Password Not Working

There are the following methods that help to let users understand how to fix this issue. So, let’s have a look:

Method 1. Swap a password With the Hex Editor

  • First, create a new excel spreadsheet file (.xls) using any Hex editor.
  • Then, you can set a password in the VBA code by clicking on Alt + F11.
  • Save that particular file and then, click on Exit.
  • After that, open a file that you have already created with the help of Hex Editor.
  • Copy the beginning of a line with the given below Keys: CMG=….DPB=….GC=….
  • With the Hex Editor, open the excel file you want to crack a password and paste the above-copied lines from a dummy file.
  • Next, save an Excel file, and after that, Exit.
  • In the end, open the Excel file where you want to view the VBA code, and now, utilize the same password that you have used for the dummy VBA file in Step 2.

Method 2. Open Visual Basic File with a New Password

  • Initially, you have to change the file extension from .xlsm to .zip file format.
  • Using WinZip or WinRar icon, open a .zip file and then, navigate to the xl folder.
Excel VBA Password Not Working
  • Now, extract the vbaProject.bin file and open the file inside the Hex Editor.
Excel VBA Password Not Working
  • Find and replace the DPB file with DPX and then, Save that file.
  • Now, under the Zip file replace the older vbaProject.bin file with the new one.
  • In the current window, you have to change the file extension of the .zip file into .xlsm again.
  • After that, open Visual Basic in MS Excel, go to the Tools menu and click on VBA Project Properties, and then, choose Protection Tab. Then, add the new password and save this .xlsm file.
  • Close and then, re-open your VBA file with the new password.

Method 3.  Solve Excel VBA Password Not Working Using Visual Basic Editor

  • First, you have to open a workbook that contains the password encrypted worksheets.
  • Now, Press the Alt+F11 shortcut key to view or open Visual Basic Editor in MS Excel. Then, type the Insert-Module and paste the following code into the right side of the window:
Excel VBA Password Not Working
  • Afterward, close the VB Editor screen and go to the worksheet that you wish to unprotect an Excel sheet.
  • Enter the Tools-Macro-Macros and click twice on Password Breaker in the drop-down list.

Hence, applying all the above manual methods you are still getting this error “Excel VBA password not working”. Then, you have to take the help of any third-party tool named as Best VBA Password Unlocker Tool. With this amazing tool, users can solve this issue easily. And this tool is completely safe and secure.

Working of the Tool – Short Guide

Step 1. Download and Run the Tool First.

Excel VBA Password Not Working

Step 2. Browse a file to recover the Lost Excel VBA Password.

Excel VBA Password Not Working

Step 3. Click on the Reset Button to Preview Password.

Excel VBA Password Not Working

Step 4. Preview the report along with the file Path, Password, and Status.

Excel VBA Password Not Working


How to fix the “Excel VBA password not working” error is one of the major issues faced by a Microsoft user. After seeing so many searches, we have discussed three manual methods to resolve this error. Along with this, we have mentioned our most recommended tool to solve this error in a few steps mentioned above in the article.