need a VBA password break for excel worksheets. the one I have is no longer working for some reason?

Here is a copy of the script that is no longer working:

Sub PasswordBreaker()
 
  Dim i As Integer, j As Integer, k As Integer
  Dim l As Integer, m As Integer, n As Integer
  Dim i1 As Integer, i2 As Integer, i3 As Integer
  Dim i4 As Integer, i5 As Integer, i6 As Integer
  On Error Resume Next
  For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
  For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
  For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
  For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
     
       
 ActiveSheet.Unprotect Chr(i) & Chr(j) & Chr(k) & _
      Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
      Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
  If ActiveSheet.ProtectContents = False Then
      MsgBox "One usable password is " & Chr(i) & Chr(j) & _
          Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
          Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
   ActiveWorkbook.Sheets(1).Select
   Range("a1").FormulaR1C1 = Chr(i) & Chr(j) & _
          Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
          Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
       Exit Sub
  End If
  Next: Next: Next: Next: Next: Next
  Next: Next: Next: Next: Next: Next


End Sub

I desperately need this to work as folks at work tend to lock shared worksheets needlessly of which I'm responsible for admin-ing. Thanks for your help!!
daniel registerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ThomasMcA2Commented:
Experts on this site are forbidden to provide any information on circumventing security.

With that said, I do have a suggestion: instead of trying to guess a forgotten password, give your users a tool to store them securely.
Dr. Thomas HenkelmannDirector Consulting ServicesCommented:
Hi,

the good think is that Excel - as all the Office products - are "only" a collection of XML files that hide behind the xlsx document type. With that being said, you can efit the XML as described here: http://community.spiceworks.com/how_to/71110-remove-password-from-excel-workbook-worksheet

Regards

Thomas

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
[ fanpages ]IT Services ConsultantCommented:
Which version of MS-Excel are you using, daniel register?

If MS-Excel 2010, or below, then the above Visual Basic for Applications code should resolve you issue (eventually).

However, if you are using MS-Excel 2013 or, rather, if the worksheet was protected using MS-Excel 2013, then the above code will not be adequate for your requirements.

This is because within MS-Excel 2013, the password "Hash" is longer/more complex than the four-character strings used in previous versions of the product.  This added complexity means that every password used has a unique "Hash"; one that is not shared with any other password.
Martin LissOlder than dirtCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Roy CoxGroup Finance ManagerCommented:
Should this question's answer even be here. I understood that like most Forums tha VBA code to break passwords was not allowed on EE.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.