How to Use VBA Code to Crack Excel Workbook Password


    Regular MS Office Excel user may know vba code can unprotect excel worksheet and workbook password, so for new users and regular users, this article tells how to use VBA code to crack excel workbook password when forgot it and when it failed, what’s the best solution?

    VBA macro is useful for excel deep user, but we should know that VBA project also has password restriction, then how to remove it to use freely? PassWiper for Excel comes to help, and here also list how to use it below, let’s see everything detailedly about VBA code.

    Part 1: Can Excel Password be Cracked with VBA Code?

    Yes, Excel passwords can be cracked with the help of a Visual Basic for Applications (VBA) Code. Mostly the latest version of Microsoft Excel files can essentially be regarded as a .zip file. So extracting data from a password-protected xlsx file can be done very easily by following the steps mentioned below.

    • At the very first, make a copy of the original file to a separate folder. This is suggested so that the original file does not get tampered.
    • The next step that is needed to follow is you need to rename the file to a separate .zip extension.
    • Now, extract the content with the help of winzip, or something contrasting.
    • After the extraction is complete, the next thing you will do is open the xl\worksheets\sheet1.xml. It is preferred to open it as a text file by using a notepad++ or something similar.
    • The next step you will do is to search for sheetProtection.
    • You are required to remove everything from <sheetProtection to and including the terminating />.
    • Then saving the entire content as a .zip.
    • Further, rename the .zip file to.xlxs. The password is gone.

    Though the above-mentioned process is not a preferred solution to crack an Excel file, nevertheless it can be worked on.

    Part 2: How to Use VBA Code to Crack Excel Workbook Password

    The strings of Visual Basic for Applications (VBA) are directly compared with the XLS files. Thus, an easy way to make access a protected Visual Basic for Applications (VBA) Excel file is simply by interchanging the password entered into the file. There are several freeware software program that helps perform a simple disk edition in order to crack the protected passwords of the files. The particular approach is carried forward by using an algorithm. This, as result, creates a spreadsheet with a familiar password which then copies it to the respective available fields. The given below points are the steps that can be followed in order to remove the password from a password-protected Excel workbook using simple vba code to crack excel workbook password.

    VBA project password can also be a way to password protect Excel file, but people often tend to forget it, so try this article to know the best VBA password breaker if you need.

    1. At first, the extension needs to be changed. That is, the file is changed to XLS from XLSM format. The next step is to “create a backup of the file”. This backup is to be created in a reliable location and then creating a fresh Excel file in the XLS format. For the Visual Basic for Applications (VBA) project, it is better to generate an easy password like “123”. In order to do the same, you are now needed to follow the given sub-steps: Open the MS Visual Basic for apps. Then click on the “Tools” menu. Further, “select” the option of VBA project properties.
    2. In the next step, select the “Protection” tab option and enter the password. This is followed by re-entering the password for confirmation. Then click on option “OK”.
    3. Next, you need to create a random password. Then click on option “OK”.
    4. Then, save the file that is created and open the same file by using one of the tools for password cracking.
    5. In that tool, simply copy the lines that start with keys like “CMG=.., GC=…, DBP=..”
    6. Then paste the “CMG=.., GC=…, DBP=.. lines” to the file in which the Visual Basic for Applications (VBA) is unlocked. These lines are copied from the sample file.
    7. Now, save the excel file, after which exit the application.
    8. Then, open the cracked excel file and enter the password for VBA code “123” which was first set in the beginning.

    Part 3: Why VBA Code Crack Excel Workbook Password Failed?

    VBA Code Crack Excel Workbook Password failed because the updated version of Excel has implemented several security features that make cracking of Excel Workbook Password using VBA code almost impossible. However, all is not lost. There are several well-known and recognized softwares like PassWiper for Excel that are able to extract data from a password-protected file. Such software has features like: removing password from the excel instantly. This is done without damaging the original data, and the success rate is also 100%. There is more than just VBA code to crack excel password, learn more detailed information to know how to crack excel password without data loss.

    Note: 🎈 If your worksheet has been password-protected and VBA code not working, then try this tool, it can also remove VBA project password at the same time.

    Secure Download
    • Excel passwords are recovered in a very short span of time, whatever be the password length or the password complexity. It can also save the cracking process to recover excel password when you’re free.
    • Multiple approaches to bypass the password use the most recent decryption algorithm, thus making password recovery faster and easier and the interface is user friendly.
    • PassWiper for Excel removes the editing restrictions for the xlsm format, removing VBA project password to enable you to use advanced functions in excel.
    • It can remove the worksheet and workbook under Office 365, and from Excel 2021,2019,2016 and so on. You can even remove the restrictions without downloading Office.

    This is how you can remove excel password using PassWiper for Excel:

    Step 1: Install the tool and open it. select “Remove Excel Password”.

    remove excel password

    Step 2: Import the excel file by clicking the plus icon.

    remove excel password 2

    Step 3: Click on “Remove” and the program will begin to bypass the password. Once done, click on “Open Folder”, you will notice that there is a new file. Congratulations! This file won’t be having any password and restrictions.

    remove excel password 3


    At the end of this article, you have got a basic idea of what Visual Basic for Applications (VBA) is all about. Also, you got a brief understanding of how can excel passwords be cracked with the help of Visual Basic for Applications (VBA) code. Also, you got an idea of how vba code crack excel workbook password and also the limitations and the subsequent alternative for the same. However, with PassWiper for Excel, you can easily crack Excel workbook with no limitations. So, which way you’d like to choose?

    Secure Download
    Home > Excel > How to Use VBA Code to Crack Excel Workbook Password
    Professional editor of iToolab, Liam has been working in software industry for more than 10 years. Focusing on solving iphone, android and problems, the online articles have helped millions of users.

    Leave a Comment

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