es there is, as long as you are using a
.xls
format spreadsheet (the default for Excel up to 2003). For Excel 2007 onwards, the default is .xlsx
, which is a fairly secure format, and this method will not work.
As Treb says, it's a simple comparison, so one method is simply to swap out the password entry in the file using a hex editor (see Hex editors for Windows). Step by step example:
- Create a new simple excel file.
- In the VBA part, set a simple password (say - 1234).
- Save the file and exit. Then check the file size - see Stewbob's gotcha
- Change file extension to zip file and open this file and find a file Name "\xl\vbaPorject.bin"
- Open the file you just created with a hex editor.
- 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).
没有评论:
发表评论