MrExcel Publishing
Your One Stop for Excel Tips & Solutions

VBA Project Locked

Posted by Tester on October 16, 2001 12:15 PM

While attempting to work with a Workbook sent to me I am repeatedly getting this prompt "Your VBA-Project is Protected"

Is there a way to by pass this and still work with this workbook.

All help much appreciated

Posted by Tom Urtis on October 16, 2001 3:23 PM


You can work with the workbook but you cannot access, edit, or change the effects of the programming code that is stored in the Visual Basic Editor and/or the worksheet & workbook modules.

You have 4 options, 3 of which are harsh:

(1) Contact the person who knows the password to unlock the VBE and plead with him/her to tell you. Once you have the password, disable the protection in VBE by going to Tools > Macro > Visual Basic Editor, then while in VBE go to Tools > VBA Project Properties, select the Protection tab, deselect "Lock project for viewing", then clear the password fields and click OK.

(2) If you are unable to contact the password holder, there are commercial software & services for cracking many such codes. is one that sells such software (linked from this site on Bill's main page), and is a service that finds the password for you (for a fee of course) if you send them a copy of your file. Potentially harsh harsh harsh because you don't want a reputation as a code breaker so be careful with this option. However, if the spreadsheet author is deceased or unreachable or forgot the code, then this is a good option.

(3) Re-create the file the way you want, with your own code (harsher harsher harsher).

(4) Live with the file you have (harshest harshest harshest).

In the Emerald City of password protection, the one who holds the password wears the ruby slippers, at least for the time being. However, if option 1 fails, and options 3 and 4 are not viable, then the wicked witch (or warlock) in you may consider option 2 (if negotiation fails in option 1), or maybe some other ideas you or someone else can come up with. Option 1 is your safest and best long-term bet for staying on the best relations with fellow spreadsheet writers. Go the professional schmooze route whenever possible to get the existing password. It's good business, and besides, individual sheets and cells may well be protected with that same password so you'd need to know it anyway. Plus, the author may know that changing one small piece of code will upset the whole applecart file and that is why it's protected.

Good luck.

Tom Urtis