其他技巧 - graybull's Blog
Crack the password on an Excel VBA project/破解Excel VBA密码
I worked with Excel 2003 using the method below. If you need to work with Excel 2007,
you could transform .xlsx file into .xls file first, then have a try to follow the method.
- Create a new simple excel file.
- In the VBA part, set a simple password (say - 1234).
- Save the file and exit.
- Open the file you just created with a hex editor. (I use HxD Hex Editor, just google and download it)
-
Copy the lines starting with the following keys:
CMG=.... DPB=... GC=...
-
FIRST BACKUP the excel file you don't know the VBA password for, then open it with your hex editor, and paste the above copied lines from the dummy file.
- save the excel file and exit.
- Now, open the excel file you need to see the VBA code in. The password for the VBA code will simply be 1234 (as in the example I'm showing here).