Don’t you just hate it when you forget a password? I’ve been in that situation many times simply because I do believe in hard-to-guess passwords while never writing them down (what’s the purpose of the password if you are going to write it down?
).
Here is a VBA (Visual Basic for Applications) macro for Excel that removes worksheet protection that I used almost 2 years ago when I needed to unprotect a file left by the person that held my position before me.
The idea of the macro is very simple: it loops generating passwords and provides you with one that will work. Note, that the one that it provides is almost never the one that was used to actually protect the worksheet but I am not going to explain why that is so. That is not the purpose of this post
I don’t know who wrote it but I know there are people that will one day need it so here you are: download the code here .
This macro should work with Excel 97, Excel 2000, Excel XP / Excel 2002, Excel 2003 and Excel 2007.
i want to break code to protect worksheet, workbook,and when open
I *urgently* needed to unprotect a sheet, and the fun works just fine. Excellent trick!
That goes to show how quickly even the notoriously slow VBA, and using a brute force method, as well, is able to break a 40 bit hash.
This code is really superb and working fine.;…..
Thanks a lot
Excellent work. Code looks so simple.
Just a notice: link seems to be broken.
i have a macintosh .. where am i suppose to put this code.. ??
Unfortunately Microsoft killed VBA for Office on the Microsoft platform back in 2007. At the time the Microsoft Mac Business Unit (Mac BU) announced it will be discontinuing support of Visual Basic scripting in the next version of Office for Mac, but said it is working hard to increase support for standard Mac scripting methods such as AppleScript and Automator.
Source: http://www.macnn.com/articles/06/08/07/ms.kills.virtualpc/
Thanks.
It solve my purpose. If possible can you explain me the Coding.