How to bypass Excel VBA Project password – accepted answer on Stackoverflow

How to bypass/remove Excel VBA Project password – accepted answer on Stackoverflow

This accepted answer got nearly ̉600 Upvotes on Stackoverflow and it works for many people. VBA Project Security is not so secure.

!!! Please backup your files before using the code !!!
I am not responsible for any damage caused
Use at your own risk
I assume you have a good faith in doing this.

Link to code:

Xem thêm video học và các thủ thuật excel:

Notify of
Newest Most Voted
Inline Feedbacks
View all comments
trung dai nguyen

Chào bạn, mình thử làm theo hướng dẫn trên nhưng khi run thì bị báo lỗi phải update cho system 64 bit thì phải làm gì tiếp theo. Mình xin cảm ơn !

Daniel Lingga

super cool it works many thanks

praveena Saravana

Great! Thanks, it worked!


doesn't work on a 64bits system, i tried by adding PtrSafe on declarations but then i get a mismatch error

Richard Peugeot 309

brilliant brilliant it works 🙂 thank you so much that really made my day

you tube windows



After following all steps, when trying to access previously password protected vba project, the excel crashes and the excel closes automatically. Can you help?

Nimesh Jayalath

Thank and this is working Thanks for the support

Thank you so much! This actually works!

This actually worked. Thank you!!!

Matheus Marra

Thanks, worked like a charm

Singgih Photoworx

works for me…. thanks.

Carlos Graña

Worked perfectly!!! Thank you

abdul safwan

How to view code or edit code if it’s project is unviewable

Sidnei Ribeiro

Thank you so much for sharing this to us. Great job!

Many Many Thanks. It is really helpful. Thanks Once again


Hi. It didn't work for me 🙁 What do I do when the file is overly protected and you cannot even click on Insert>Module to add your code? Please help me. Thank you.

eunice chan

thank you so much 🙂 good code

Rodrigo Mizumoto

Hey man! First of all, congrats for this brilliant job! This is exactly what I was looking for and actually I would be happier if I haven't found it so easily lol… Let me explain: I'm working on a project that will handle and keep some confidential information in an Excel sheet, so I need to keep everything protected and it depends heavily on keeping my VBA project protected too. Is there a way to avoid your code from bypassing the password or any other way to keep my project protected? Thanks in advance! Greetings from Brazil!

nguyen son

that's amazing. Thank you very much.

DropOut Trader

not working man please help me out …64-bit error

Upendra Reddy

many thanks Bro,
it is working fine,

Divit Jain

Can u plz share the script..

Deneb Yuen

Easy and does the job perfectly! thanks


It work perfectly. Many thanks

Customer Experience

Great piece of code, worked a treat and helped me out of a bind picking up work for someone who left a mess of documents.

Eduard Bugelnig

Worked perfectly, thanks

Herman Asen

can i change the original password after i can open the vba project password?



Thaks very much!!!

Sandro Golobovante

Perfect !! Tks !!!

Susanta Kumar

In my case the file type is .Xlam and when I click on VBA project it's showing "Project is unviewable" Please let me know if you have script for this as well.