Password Recovery

How to Remove a VBA Password in Excel

Leena Taylor Paul By Updated August 28, 2026 9 min read
Quick Answer

An Excel VBA project password is a flag inside the file, not encryption, so it can be cleared from a file you own even when the word is long gone. A dedicated remover does it cleanly, while the free hex trick works sometimes and corrupts the file other times. The Univik VBA Password Remover for Excel handles it in one step.

You open your own workbook, head into the macro editor to fix a bug, and Excel asks for a password nobody wrote down. The file opened fine, so why is the code locked. Because two different locks are in play, and the one blocking you is far weaker than it looks.

Which Password Actually Stops You

Excel has three locks that people lump together as one, and the fix depends entirely on which one you hit. Pick wrong and you waste an afternoon on the impossible one.

Workbook open password
Real AES encryption on the whole file. No word means no entry. This one does not come off.
VBA project password
A weak flag that hides the macro code from the editor. This is the one you can clear.
Sheet or structure protection
Another weak flag that blocks edits to cells or tabs. Also removable, but a separate job.

The workbook opened for you, so the open password is not your problem. If the block appears only when you enter the code editor, you are on the VBA project password, and the rest of this page is for you.

VBAProject Password
Password
●●●●●●●●
OK
Cancel
The prompt that appears when you open a locked VBA project in the editor

The Fast Safe Way to Open Locked Macros

A dedicated remover skips the risk of hand editing the binary. It reads the file, clears the project lock and writes the workbook back with the macros intact. No hex editor, no rezip, no risk to your only copy.

  1. Make a copy of the workbookAlways work on a duplicate so the original stays safe.
  2. Open the copy in the removerPoint the Excel VBA remover at the file.
  3. Clear the project passwordThe tool strips the lock and saves the workbook.
  4. Open the macros in the editorYour code is there, ready to read and edit.
Univik VBA Password Remover with a protected Excel XLSM workbook loaded and ready to unlock
The Univik VBA Password Remover with a protected Excel workbook loaded for unlocking
Back into your macros without touching a hex editor

The Univik VBA Password Remover clears the project lock on your Excel file and leaves every macro exactly as written, so you can read and edit the code again in one step.

Free Download See All Features

Why a VBA Project Password Comes Off

The lock is weak by design. Setting a VBA project password does not encrypt anything in Excel. The word only makes the editor ask for it before the code appears, while the macros sit in the file in plain form throughout, so clearing that gate never alters a line. How the gate is built, down to the keys a hex editor targets and why they matter, is set out in the mechanism reference this set points to. In short, a protected project can be read without the word, as the security research on VBA passwords showed years ago.

Nearly every ticket on this starts the same way. Someone thinks they are locked out for good, when the code was sitting there in plain form all along. The VBA project password was never built to keep a determined owner out of their own macros. Knowing that makes it a two minute job.

NR
Nick Rogers
Founder, Univik
Building Windows tools since 2013

The Free Hex Editor Route in Short

The route every forum names works on the same weakness. You rename the .xlsm to .zip, reach vbaProject.bin in the xl folder and overwrite the four protection lines, then repack the workbook. It clears the lock on some files and corrupts others, and it gives out on newer and 64 bit builds where the values no longer line up. The full walkthrough, the keys it touches and every way it breaks sit in the hex editor reference this set is built around. On a workbook you cannot afford to lose, that fragility is the reason a remover exists.

Work on a copy
A botched manual edit can leave Excel stripping the macros with no way back, so keep the original set aside and edit the duplicate.

Which Excel Files Hold Macros

Only some Excel files carry code, and the extension gives them away. A .xlsm is the everyday macro workbook. A .xlsb keeps the same content in a binary layout and runs macros too. A .xlam is an Excel add-in whose macros load for use across every open workbook. The older .xls from before 2007 holds a project as well. A plain .xlsx cannot store macros at all, so a lock never turns up on one. Whatever the type, the VBA project inside is what the password sits on.

What Removal Changes and What It Leaves

Clearing the project password is a small, contained change. It touches the gate and nothing else.

Stays exactly the same
Every macro, module and form. The code opens as its author wrote it, character for character.
Not affected at all
A workbook open password. That is AES encryption on the file and no macro tool removes it.
Excel VBA project details in the Univik remover listing the modules and forms kept intact after unlocking
Excel VBA project details showing the modules and forms that stay intact after the lock is cleared

So the worry that removal might scramble your macros has it backwards. The code was always readable to the file, the lock only stopped the editor from showing it.

Legitimate Reasons to Remove a VBA Password

This comes up in everyday work far more than in anything shady. A developer built your reporting macros, set a password and left the company without a handover. You inherited a workbook that runs the finance team's month end and the author is long gone. An audit needs the code reviewed and the original owner cannot be reached. A tool you paid for shipped with locked macros you are entitled to maintain. In each case you own the file or hold the right to work on it, which is exactly where a remover belongs. Removing the lock on a file you have no permission to touch is a different matter, so keep this to your own work.

Better Ways to Protect Your Own Macros

If the reason you are here is that a weak password let someone in, the fix is not a stronger VBA password, because there is no such thing. The project lock is a gate over code that stays in plain form. Real options exist. Move the sensitive logic into a compiled add in or a DLL that ships as bytes, not readable source. Digitally sign your project so users can trust its origin. When the thing to protect is data and not code, put a genuine open password on the workbook, since that one is real encryption. The VBA remover range also covers Word, Access, PowerPoint, Outlook and Project when the same lock turns up elsewhere in Office.

VBA Password Removal Questions

Yes, on a VBA project password. That lock is a flag stored in the file, not encryption, so it can be cleared without the original word. A workbook open password is real encryption and cannot be removed this way.

Removing the lock on a workbook you own or look after is a normal recovery task. Inherited macros, a developer who left and a security review are all everyday reasons. Doing it to someone else's file without permission is not, so stay on files you have the right to open.

No. The source code sits in the file untouched whether the lock is on or off. Clearing the password only flips the gate that hides the code from the editor, so every macro opens exactly as its author wrote it.

Those are two separate locks. The workbook opened because it has no open password, while the VBA project has its own password that blocks the editor from showing the code. You cleared one gate and hit another.

It can. Editing the binary by hand goes wrong on newer builds and mismatched key lengths, and Excel then strips the project as damaged. Work on a copy, never the original, if you try it at all.

A VBA project password hides the macro code and is a weak flag. A workbook open password encrypts the whole file with AES and is strong. The first comes off without the word, the second does not.
Leena Taylor Paul

Written and maintained by Leena Taylor Paul and the Univik team, developers of Windows data conversion and recovery software since 2013. Plenty of the people we help inherited a workbook whose author had long gone, so the guide sorts out which lock they face before pointing them at the safe way through. Last verified August 2026. Locked out of macros you are meant to maintain? Contact our support team.