Wednesday, October 12, 2011

How to remove VBA project password

Originally it was posted for  Excel VBA, but apparently works for Access.

  • Make backup.
  • Open the file with a hexadecimal editor, find the string "DPB" and change it to "DPx".
  • Then you open the file in Excel, switch to the VBA project and change the password (don't remove it, just change it). Save the file, reopen it, go to VBA project (using the password you've just created) and remove the password.

25 comments:

  1. Lest anyone be fooled into thinking VBA projects are secure, let this be a lesson.

    ReplyDelete
  2. Despite (the other) JP's comment, this is the kind of information that's better kept quiet.

    ReplyDelete
  3. I don't think this is a big secret, if you search for How to remove VBA project password - you will get several hits with same info. This should indicate that "VBA project password" is weak security and you should choose something else.

    ReplyDelete
  4. Sure, but FWIW, this post is endorsed by a Microsoft MVP.

    ReplyDelete
  5. This is public information, people should be aware of such bugs.

    ReplyDelete
  6. I'm glad you pointed this out. I didn't know you could remove a VBA project password so easily.

    ReplyDelete
  7. And when you see how much some companies charge for a program that does just that...
    Thanks for the trick !

    ReplyDelete
  8. Wow! I am just so awestruck on how easy that was to remove VBA project password. Thank you for the info and I think I'll try other means to secure my excel files.

    ReplyDelete
  9. Thank you for sharing this good info but is there any other way that I can remove the password without downloading the software?

    ReplyDelete
  10. Anonymous11:16 PM

    A great little snippet... Lost countless hours with numerous apps offering no recovery. this snippet literally saved my life... thank you so much

    ReplyDelete
  11. Anonymous6:13 AM

    Is there a solution for access?

    ReplyDelete
  12. Try http://www.everythingaccess.com

    ReplyDelete
  13. Anonymous5:25 PM

    It worked for me for access
    ui have access 2013 :)

    ReplyDelete
  14. Anonymous5:46 PM

    one thing actually
    it didnt work with access database that has a user-level security or workgroup securtiy
    donno i will keep tryin but it worked for many datbases on my pc

    ReplyDelete
  15. I think you have to turn off user-level security first...

    ReplyDelete
  16. Anonymous9:35 PM

    but sir u cannot do so unless u unlock the VBA of the user-level secured database
    i don't have access to it

    ReplyDelete
  17. Anonymous6:58 PM

    is there anyway to reverse the user level security process??
    any tools or software??

    ReplyDelete
  18. Look at http://www.everythingaccess.com/

    ReplyDelete
  19. Anonymous11:45 AM

    mmm thank you for your help
    this is a great site
    i earned much from it but still didn't get what i want
    i searched the whole web about unlocking the workgroup security level but nothing serious
    :(

    ReplyDelete
  20. Anonymous6:15 PM

    Any help??

    i found lots of DPBs in the database, which one to change??

    is there any clue ??
    this method worked for some VBA protected databases, but for this one with MDW file and user-level and security didn't work
    any help??

    ReplyDelete
  21. Why dont you ask http://www.everythingaccess.com ?
    I think they will help you, at least you can try...

    ReplyDelete
  22. Anonymous9:36 PM

    great article thanks for the advice - you pulled me out of a hole after i inherited a password protected access mbd project ( it was the VBA script which was protected)

    ReplyDelete
  23. How do you open this file in Excel from a hexadecimal editor?

    ReplyDelete
  24. Close Excel, run editor and open excel file there

    ReplyDelete
  25. Anonymous12:16 AM

    It works in Access too! Confirmed. Thanks a lot!

    ReplyDelete