How to break VBA password in Excel
If you use VBA protected password in Excel but don't remember the password, please read the article below to remove that VBA password.
- Create your own Internet "browser" with VBA
- OpenOffice.org Calc adds Excel VBA support
How to set a password
If you are trying to crack the VBA password, you probably already know how to set it up. However, here, I will talk about how to set up this type of protection.
Go to the Developer tab in Excel and click Macros .
If you don't see the Developer tab, go to File> Options , then select Customize Ribbon . Now move the Developer command group from the left panel to the right.
Once you have selected Macros in the Developer tab, enter a name for your Macro (this is just an example, so you can enter another name as you like), then click Create.
Copy and paste the code below into the Visual Basic Editor. This is a simple macro that allows the text to be quoted in cell A1. It has no real purpose, but here, we need to create a file for password protection.
Range ("A1"). Value = "Password Protected"
You should end up like this.
In Visual Basic Editor, navigate to Tools> VBAProject Properties .
Go to the Protection tab to set the password. You also need to check the box next to Lock project for viewing .
Click OK, make sure you saved the Excel document as an XLSM file. Now we can check if the newly created password is working. Close the document, then reopen, go to the Developer tab and click Visual Basic .
When you access the VBAProject document, you will see a prompt to enter the password. Now we are looking for a way to remove this password.
How to break the password
First, we will need to download a Hex editor. If you haven't already, HxD (application for hex code editing) will be a good free alternative.
Download HxD
Download Hex
This process will be slightly different depending on whether we are cracking the password in the old XLS file or the new XLSM file. If you are working with an old file, you can skip the section below.
Prepare XLSM file
We need to do some extra work to clear the password from the XLSM file. Find the XLSM file on your hard drive, then rename it, add the .zip extension at the end.
Next, open the file using compression software like WinRAR or 7-Zip. You should find a directory named xl.
In this directory, you need to search for a file named vbaProject.bin .
Extract this file and open it with Hex Editor.
Disable password
This is the time to set another password. Create a virtual Excel document, add Macro to it and set the password as described above. Next, we will get the specified Hex code and insert it into the file we want to access.
Once you have set up the file, save it and do the same as the closing process of the vbaProject.bin file above. Remember the password!
Now, you will have both files vbaProject.bin open in Hex Editor.
Use Ctrl + F in the file you created to find the string below:
CMG =
This is the beginning of the code that defines the current password. We need to copy and paste the following 3 values:
CMG =
DPB =
GC =
Below you can see how I do it.
Move this code to another vbaProject.bin file and place it in the corresponding location. Save the modified hex file.
Now delete the original vbaProject.bin file from the document that we are trying to remove the password. Replace it with the edited vbaProject.bin file, then rename its file from .zip to .xlms or .xls.
Open the file in Excel. Go back to the Developer tab and click Visual Basic, then try accessing the Project menu. You should see the password prompt window, the password here is exactly what we set up in the virtual Excel document.
So you can access the file again.
Conclude
This trick can be very handy when you forget your password and you need to access a password-protected VBA Macro right away. However, it will also illustrate a major security vulnerability currently present in Excel. In general, in an emergency, you can use this method to open the VBA password in Excel.
You should read it
- How to break Excel Password without software
- How to remove PDF file password
- How to crack Windows 10 password, how to break password on Windows 10
- How to set Excel password to secure data file
- The method of Crack Passwords
- How to retrieve a Tik Tok password when it is lost
- Break hotspot password on iOS within 1 minute
- Instructions on how to login to your computer when you forget your password
- How to Open Password-Protected Excel Files
- Check the security of the password
- Forgot password protected Excel file, what should you do?
- Use an 8-character Windows NTLM password? Congratulations, your password may be unlocked after only 2.5 hours
May be interested
If you want a nice, easy-to-understand presentation slide, you need to keep in mind the following
Best PC Portable Apps of all time (Part 3)
How to create Google Spredsheet automatically updates data
How to download Microsoft Office version completely free?
How to create a Google Form form on Google Drive
Powerful support utilities for Google Slides