Removing the password from a VBA project

后端 未结 6 1774
没有蜡笔的小新
没有蜡笔的小新 2020-11-30 17:08

How can I programmatically remove a (known) password from an Excel VBA project?

To be clear: I want to remove the password from the VBA Project, not the workbook or

6条回答
  •  攒了一身酷
    2020-11-30 17:43

    I found another way to solve this one to avoid password of VBA Project,with out loosing excel password.

    use Hex-editor XVI32 for the process

    if the file type is XLSM files:

    1. Open the XLSM file with 7-Zip (right click -> 7-Zip -> Open archive).
    2. Copy the xl/vbaProject.bin file out of the file (you can drag and drop from 7-Zip), don't close 7-Zip
    3. Open the vbaProject.bin file with HexEdit
    4. Search for "DPB=" and replace it with "DPx="
    5. Save the file
    6. Copy this file back into 7-Zip (again, drag and drop works)
    7. Open the XLSX file in Excel, if prompted to "Continue Loading Project", click Yes. If prompted with errors, click OK.
    8. Press Alt+ F11 to open the VBA editor.
    9. While press it will show error “Unexpected error (40230)”, just click OK (6 or 7 times) until it goes away.
    10. Then it will open Automatically

提交回复
热议问题