I have your answer, as I just had the same problem today:
Someone made a working vba code that changes the vba protection password to “macro”, for all excel files, including .xlsm (2007+ versions). You can see how it works by browsing his code.
This is the guy’s blog: http://lbeliarl.blogspot.com/2014/03/excel-removing-password-from-vba.html
Here’s the file that does the work: https://docs.google.com/file/d/0B6sFi5sSqEKbLUIwUTVhY3lWZE0/edit
Pasted from a previous post from his blog:
For Excel 2007/2010 (.xlsm) files do following steps:
- Create a new .xlsm file.
- In the VBA part, set a simple password (for instance ‘macro’).
- Save the file and exit.
- Change file extention to ‘.zip’, open it by any archiver program.
- Find the file: ‘vbaProject.bin’ (in ‘xl’ folder).
- Extract it from archive.
- Open the file you just extracted with a hex editor.
-
Find and copy the value from parameter DPB (value in quotation mark), example:
DPB=”282A84CBA1CBA1345FCCB154E20721DE77F7D2378D0EAC90427A22021A46E9CE6F17188A”. (This value generated for ‘macro’ password. You can use this DPB value to skip steps 1-8) -
Do steps 4-7 for file with unknown password (file you want to unlock).
-
Change DBP value in this file on value that you have copied in step 8.
If copied value is shorter than in encrypted file you should populate missing characters with 0 (zero). If value is longer – that is not a problem (paste it as is).
-
Save the ‘vbaProject.bin’ file and exit from hex editor.
- Replace existing ‘vbaProject.bin’ file with modified one.
- Change extention from ‘.zip’ back to ‘.xlsm’
- Now, open the excel file you need to see the VBA code in. The password for the VBA code
will simply be macro (as in the example I’m showing here).