Ever felt the need to open a VBA protected excel file... maybe one of your old files that contained an excellent routine! How do you come out of that pain?
Important: This article is for educational purposes. Try this method for opening ONLY your own files, as I did too!
So how does Excel store the file contents - cell data including formulas and formats, conditional formatting, VBA code, etc. etc. Lets investigate. Create a new Excel file MyTest.xlsm and enter some dummy test data in the first sheet. Add some formulas and conditional formatting (if you want to really understand the details).
Let us now see how excel stores this data in the file. Open the file in notepad or a hex editor. Did you notice the first 2 characters? "PK". So Excel compresses its file contents. Now we know why there is not much difference if you compress an Office 2007 file.
Lets look into the compressed contents. Rename the file extension from .xlsm to .zip
Open the MyFile.zip file. Wow! its an extensive structure with xml files to store the workbook, worksheets, calculations, sharedstrings, etc.
This is how the XML of the Sheet1 looks
Lets explore more. Lets go back to our original file and add some VBA code to it.
Add a password and protect the VBA code.
Save the file and redo the same steps as earlier to open the xml file structure. We now have another XML file called vbaProject.bin. This is the file that I need to recover. Lets investigate further. Open this file in a Hex Editor (there are lots of free ones out there... the one I use is Hex Editor Neo at http://www.hhdsoftware.com/Products/home/hex-editor-free.html).
Search for the keyword "DPB" in the content. Remember to find it just above "[Host Extender Info]".
Once found, replace the string "DPB" to "DBx" and save the file. Now replace the edited "vbaProject.bin" file and place it back into the compressed file collection (replace with the old one). Rename the compressed file back to ".xlsm".
Try to open the file in Excel. It gives an error saying that the file contains an invalid key DBx. Hit Yes and proceed. The file opens. So far good. Now go to the VBA editor.
Next it gives another error "Unexpected Error". Proceed again by hittng OK
VBA Editor opens. Now try to open the module code. Again the "Unexpected Error". Dont lose heart... we are just there. Save the file and close it. We are all set. Your file is as good as new without the VBA password. Go check for yourself!
So Excel may NOT be encrypting the VBA file after all, rather it is only setting a flag to lock the VBA content. This is evident because we can still see the code in the vbaProject.bin file (that we had written in the VBA earlier).
Some more interesting bits. Check how Excel stores its file contents. Look into the file sharedStrings.xml. It stores the strings at a global level, not in the sheet itself. Also look into how it stores the formulas and formatting. Try out things like like dragging a cell content (like Area 1) into 5 cells (producing Area 1, Area 2, Area 3...) and see how it stores the values... using ranges.
That also says that, it may be better to access Excel data directly from these XML files rather than through the Excel application model. We could have much more control and simplified logic for storing (for instance in database), transporting (eg client machine to server), opening and displaying simple content. Many possibilities here...
Well, I was pretty pleased that today I learned something new... and an unlocked VBA code.
Subscribe to:
Post Comments (Atom)
Worked like a charm! Thank you!
ReplyDeleteIs it possible to convert an exe, that was previously a xlsm, back into xlsm?
Você é muito bom! Parabéns!
ReplyDeleteHow to open password protected excel file?
ReplyDeletegreat work... thanks a lot...
ReplyDeleteExcellent post! I was searching everywhere for a VBA password unlocker/remover, and your instructions above worked like a charm (with the Hex Editor suggested above).
ReplyDeleteOutstanding work, m8! You saved me a *lot* of work.
ReplyDeleteAmazing! It works! Thank you so much for this :)
ReplyDeleteSimply amazing.. a brilliant post!
ReplyDeleteHi Gautham,
ReplyDeleteThanks a lot.
I tried the procedure for xls files - which are created in excel 2003.
It does not open when we save the file with the extension of .zip.
Is there any other method of opening these files.
Thanks,
Pradeep
You can use a password recovery master to remove such password, just look it up, there are a lot of them, e.g. Excel password Lastic, Password-Find, Rixler.
Deleteit is not working for an excel 2010 file (.xlsm). it is dumping the vba projects and saying they have been corrupted.
ReplyDeleteWorks great, thanks so much!
ReplyDeleteHey Buddy... Thanks a mill.. Your guidance rocked... hurray
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteWorking Dude Thanks a lot....
ReplyDeleteawesome.
ReplyDeleteIt really works.
Thanks it works like awesome..........
ReplyDeleteIt works great for 2010 for xls file I open and save it as xlsm which opens fine as xls but vbaProject does not cracked properly.
ReplyDeleteIts Works fine!! Meus Parabens. Abraços do Brazil
ReplyDeleteThanks very much
ReplyDeleteI won't be able to recover the password. I'll be very obliged if you crack my vba's password. Kindly send me your email address at arshad.ali91@hotmail.com
ReplyDeleteI won't be able to recover the password.
ReplyDeletei will be very thankful to you if help me on this.
please send me your email.
huziraj@gmail.com
Thank you very much!
ReplyDeleteIts working now for me!
Great Post!
Hi Gautam,
ReplyDeleteIs working fine, is just fantastic!
Thank you so much!
P.s There is a way to recover the password?
Thanks a ton...it worked gr8....cab u tell mw how to open a file which i s password protected
ReplyDeleteThanks a lot. Worked like a charm.
ReplyDeleteThank You very much
ReplyDeleteHi, this trick is amazing and it work for me for long time, but not work anymore in Windows 7 x64 and Office 2013 x64.
ReplyDeleteI have compared files one protected and other not protected and I find 2 XML files and vbaProject.bin with some different code lines in it.
There are another project about it?
Thanks a lot for to answer me!
Vilmar
Thanks a lot.
ReplyDeletedamet garm
in kharejia ajab mokhi daran
Thanks for the info. I wish I found it earlier. A few years back, your company had some locked VBA projects created by a fired employee. We had to use the service called www.passsword-find.com to remove the VBA passwords - we had to buy a license to use the service, but it did well and did the trick. Hope this information will prove useful to someone if you do not succeed with this method..
ReplyDeleteStop advertising that software all over the web. IT DOESN'T WORK!!!
DeleteThis comment has been removed by the author.
ReplyDeleteHappy to see everyone can get that... but sorry i couldnt get that. I search for DPB but text not found I am using Free Hex Editor Neo. Did I miss anything... Anybody pls help me out ???
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteYes it works.. Gotcha.. Superb
ReplyDelete@Newton : Dude just read the above blog completely and follow the exact steps. I am dead sure, it will surely works for you also.
Get Best VBA Password Recovery Software to recover VBA password via this link http://gallery.technet.microsoft.com/VBA-Password-Recovery-eac07070
ReplyDeleteRecover VBA Password http://mail2web.com/plugins/addons/addins-for-excel/password-recovery/vba-password-recovery_1206.html
ReplyDeleteThat's why we have genius for. Tks man. The best.
ReplyDeleteDear Gautam, thanks a lot. This is very simple to understand and easy to use. Great!
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteAwesome. It works perfectly. Thanks Gautam !!
ReplyDeleteCool, awesome! Works perfect.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteYes,
DeleteI used This software to recover my Excel password & unlock Excel spreadsheet within just few minutes.
PDS ( Perfect Data Solutions )
Thanks You
Gooooooood Jooooooob THX
ReplyDeleteThe given solution is working properly so thanks for providing this informative web page with best solution. I also used the given solution for microsoft office password recovery.
ReplyDeleteExcelent info thx
ReplyDeleteThank you for nice posting. To unlock Excel password really this is a very helpful tool in which a user recover Excel password and by this office password recovery it gives instant solution to recover password from the MS Office.
ReplyDeleteThank you so much! It worked perfectly
ReplyDeleteYou are a genious! Thanks!
ReplyDeletethanks a lot
ReplyDeleteWorked great using a 2010 xlsm. FYI I did not need to open the bin file using a hex editor. I opened it using Notepad++ and edited/saved it no problem.
ReplyDeleteExcellent Job!!
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteExcellent work and great article, congrats man :)
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteThanks Soooooo Much !!!!!!!!!!
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteHow to open vba content of an exe file created with Lockxls. Also how can we get vba code when projectis unviewable.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeletenordvpn crack Such a nice and helpful piece of information. I’m so happy that you shared this helpful information with us. Please keep us up to date like this. Thanks for sharing.
ReplyDeleteVBA can be easily removed with password recovery services such as Password-Find, Rixler Password Recovery and PasswordLastic.
ReplyDelete
ReplyDeleteloaris-trojan-remover-crack
Is the Best application. You can take advantage of this program to get rid of malware or trojan. While you employ an antivirus that is highly reputable though you might locate it,
new crack
Such a nice and helpful piece of information. I’m so happy that you shared this helpful information with us. Please keep us up to date like this. Thanks for sharing. avast-premium-security-crack
ReplyDeleteBytefence Anti Malware Crack Such a nice and helpful piece of information. I’m so happy that you shared this helpful information with us. Please keep us up to date like this. Thanks for sharing. Visit My site
ReplyDeletedisplayfusion crack
ReplyDeletemicrosoft-office-2013-crack-latest
ReplyDeleteGlobal Mapper Crack
ReplyDeleteConnectify Hotspot Pro Crack
ReplyDeleteSpyhunter Pro Crack
Cracks
Cockos Reaper Crack
Piriform Recuva Pro Crack
Cadsoft Eagle Pro Crack
Mycleanpc Serial Key All things considered, you might dispose of the fragile records from your hard drive unequivocally, oversee program mounted modules, PC contraptions, clear up the vault, erase individual program data, manage new pursuit applications. Offer a moment ordinary mistake review, since all issues and risks are taken out on schedule, so the PC might perform faster.
ReplyDeleteIt’s perfect time to make some plans for the long run and it is time to
ReplyDeletebe happy. I have read this publish and if I may I wish to counsel you some interesting issues or tips.
Maybe you could write next articles relating to this article.
I wish to read even more issues approximately it!
vusescan crack
ableton live crack
photo mechanic crack
youtube by click crack
mirillis action crack
Crack Like
Chinese miracle crack
ReplyDeleteendnote crack
divx crack
ibackup viewer crack
volcano box crack
For being the first person to come in and the last person to leave, we commend your dedication and hard work!
ReplyDeletemanictime pro crack
windows repair pro crack
global mapper crack
Be proud of the fact that you have the power to rise above any situation and deliver the best results no matter the circumstances. Excellent work!
ReplyDeletevce exam simulator pro crack
abbyy finereader corporate crack
easyworship crack
Nice Blog. Thanks for sharing.
ReplyDeleteCrackwatch
CATIA Latest Version
miracle box crack
sketchup pro Free Download
I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot.I hope to have many more entries or so from you.
ReplyDeleteVery interesting blog.
Crackplus.org
Toonboom Storyboard Pro Crack
I am very thankful for the effort put on by you, to help us, Thank you so much for the post it is very helpful, keep posting such type of Article.
ReplyDeleteMacrium Reflect Crack
Call of Duty: Modern Warfare
DBSchema Crack
I guess I am the only one who came here to share my very own experience. Guess what!? I am using my laptop for almost the past 2 years, but I had no idea of solving some basic issues. I do not know how to saqibtech.net But thankfully, I recently visited a website named saqibtech.net
ReplyDeletesystem mechanic pro crack
gridinsoft anti malware crack
betternet vpn crack
displayfusion crack
auslogics disk defrag pro crack
Great site and a great topic as well I really get amazed to read this. Download now. Corel Draw X6
ReplyDeleteI like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.
ReplyDeleteVery interesting blog.
softwarekick.net
ashampoo-hdd-control-crack
I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.
ReplyDeleteVery interesting blog.
plugintorrents.info
bandicam-crack
I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.
ReplyDeleteVery interesting blog.
plugsmafia.com
fotoworks-xl-crack
I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.
ReplyDeleteVery interesting blog.
iqrapc.org
lary-utilities-pro-crack
I am very thankful for the effort put on by you, to help us, Thank you so much for the post it is very helpful, keep posting such type of Article.
ReplyDeletePassFab Screen Recorder Crack
Universe Sandbox 2 PC Full Game
Toon Boom Harmony Premium 21 Crack
I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.
ReplyDeleteVery interesting blog.
plugsmafia.com
rip-fx-vst-crack
I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.
ReplyDeleteVery interesting blog.
plugintorrents.info
noteburner-spotify-crack
I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.
ReplyDeleteVery interesting blog.
softwarekick.net
wondershare-pdfelement-crack
Enjoyed reading the article down, really explains everything in detail, the article is very interesting and effective.
ReplyDeleteThank you and good luck in the upcoming articles
aiseesoft total media crack
nch drawpad pro crack
msi wrapper pro crack
nch dreamplan crack
mixcraft 9 pro studio crack
symantec endpoint protection crack
wincatalog crack
pdf xchange editor crack
passfab iphone unlocker crack
cyberlink powerdirector crack
Here at Karanpccrack, you will get all your favourite software. Our site has a collection of useful software. That will help for your, Visite here and get all your favourite and useful software free.
ReplyDeleteInfix PDF Editor Pro Crack
Here at Karanpccrack, you will get all your favourite software. Our site has a collection of useful software. That will help for your, Visite here and get all your favourite and useful software free.
ReplyDeleteAnyDesk Premium Crack
I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.
ReplyDeleteVery interesting blog.
plugintorrents.info/wp-admin
abelssoft-checkdrive-pro-cracked/
Wow Nice Post MEN
ReplyDeleteFL Studio 20 Crack ---------------------------------------
Driver Booster Key
I guess I am the only one who came here to share my very own experience. Guess what!? I am using my laptop for almost the past 2 years, but I had no idea of solving some basic issues. I do not know how to Download Cracked Pro Softwares But thankfully, I recently visited a website named freeprosoftz.co
ReplyDeleteI am a professional web blogger so visit my website link is given below!To get more information
freeprosoftz.co/
Toonboom Storyboard Pro Crack
Altair Inspire Studio Crack
PGWare GameGain Crack/
Wise Registry Cleaner Pro Crack
MiniTool ShadowMaker Crack
Bluetooth Driver Installer Crack
Crack Softwares Free Download
Wow, amazing block structure! How long
ReplyDeleteHave you written a blog before? Working on a blog seems easy.
The overview of your website is pretty good, not to mention what it does.
In the content!
vstkey.com
Overloud TH-U Full Crack
iMyFone D-Back Crack
Sonnox Oxford Reverb Crack
Lurssen Mastering Console VST Crack
Windows TubeMate Crack
PhpStorm Crack
Redshift Render Crack
I am a professional web blogger so visit my website link is given below!To get more information
ReplyDeletehttps://softwaretube.net/
Zoom Player MAX Crack/
EaseUS Partition Master Crack/
UC Browser Crack/
iPhone Backup Extractor Crack/
Dr.Fone Crack/
Adobe Photoshop CC Crack/
Substance Painter Crack/
idm crack patch
ReplyDeletefree Netflix premium crack
idm crack
internet download manager crack
Wow, amazing block structure! How long
ReplyDeleteHave you written a blog before? Working on a blog seems easy.
The overview of your website is pretty good, not to mention what it does.
In the content!
excrack.co
ActCAD Professional Crack
Wow, amazing block structure! How long
ReplyDeleteHave you written a blog before? Working on a blog seems easy.
The overview of your website is pretty good, not to mention what it does.
In the content!
readinfuture.com
excrack.co
Postbox Crack
What is a healthy lifestyle?
Solar-Powered Hymer Venture S
Xbox Gadget 360 : Edition Marketplace
Revitalizing Travel And Tourism Development: Towards Resilience
Top Most Sports Watched In The World Today
How to Create a Facebook Business Page?
Wow, amazing block structure! How long
ReplyDeleteHave you written a blog before? Working on a blog seems easy.
The overview of your website is pretty good, not to mention what it does.
In the content!
readinfuture.com
excrack.co
Pinegrow Web Editor Crack
How Can You Start A New Small Business?
BANDIT9 MONACO ELECTRIC CAR FOR SPORTS
Solar-Powered Hymer Venture S
Xbox Gadget 360 : Edition Marketplace
Revitalizing Travel And Tourism Development: Towards Resilience
Top Most Sports Watched In The World Today
How to Create a Facebook Business Page?
ReplyDeleteI am a professional web blogger so visit my website link is given below! To get more information
cracksolo.com/
iMyFone iBypasser Crack/
Stardew Valley Crack/
Removewat Crack/
iTools Crack/
NoteBurner Spotify Music Converter crack/
Spectrasonics Keyscape Crack/
Toon Boom Harmony 21 Premium/
AVS Audio Converter Crack/
Abelssoft ScreenVideo Crack/
Good work done by your self .. i really appreciate your work and effort on this content. i hope that you will continue this effort.
ReplyDelete2022NERO PLATINUM CRACK