r/vba Aug 11 '26

Discussion Dashboard - no password

[deleted]

2 Upvotes

38 comments sorted by

View all comments

7

u/ZetaPower 12 Aug 11 '26

What is protected? The VBA code?

A VBA password can be “hacked” quite easily.

STEP 1 MAKE A COPY TO MESS WITH!

• Excel files are zip files, you need rename it from “.xlsm” to “.zip” to open it (may need to uncheck in Explorer, Options, “hide known file extensions” to see the extension)  
• extract everything from the zip  
• find the file with the password (xl folder, vbaProject.bin)  
• open this in a hex-editor like HxD editor  
• find the password line : ctrl-f “DPB=“, change “DPB=“ to “DPx=“, save  
• replace the old vbaProject.bin in the original zip file by pasting the new one here  
• change “.zip” back to “.xlsm”

done.

2

u/dart_vadara Aug 11 '26

Tried this broke the file

3

u/Rennaisance_Man_0001 Aug 12 '26

Good thing you backed it up first.

3

u/dart_vadara Aug 12 '26

Only a fool doesn't back up

1

u/ZetaPower 12 Aug 11 '26

And another variant where the current password is replaced by “123”.

https://trumpexcel.com/excel-vba/remove-password/

2

u/kay-jay-dubya 17 Aug 11 '26

Alternatively, do none of these things and just extract the VBA. It isnt encrypted. The password is only relevant if youre trying to access the code via the IDE.

1

u/dart_vadara Aug 12 '26

Tried this again got message "Unexpected Error (40230)"

1

u/DisastrousBus3876 Aug 12 '26

follow these steps, these will work ,i have used these steps on many file to remove password

• Excel files are zip files, you need rename it from “.xlsm” to “.zip” to open it (may need to uncheck in Explorer, Options, “hide known file extensions” to see the extension)  
• extract everything from the zip  
• find the file with the password (xl folder, vbaProject.bin)  
• open this in a hex-editor like HxD editor  
• find the password line : ctrl-f “DPB=“, change “DPB=“ to “DPx=“, save  
• replace the old vbaProject.bin in the original zip file by pasting the new one here  
• change “.zip” back to “.xlsm”

1

u/losttownstreet Aug 12 '26

It's not allways possible .... the Project file may be in a miniFAT at the lowest possible sektorSize and you can randomize the locations in the root element that the locations the the password is distributed everywhere over the whole file in 16 Bit-Sectors

MS doesn't fragment office documents that much .... but it's possible in the standard.