Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Location
    Miami, FL
    Posts
    3,262

    VBA Excel Password Recovery


    I had this very small vba excel password code that you'd enter into an excel that was protected (so you can't edit anything) and it would display the password.

    We use these at work as different departments password protect the excel sheets and then we have to open it so we can change it for our area and now I lost it!

    Does anyone know what I am talking about? It was a small Vba code and it was free of some website and i can't remember the URL.

  2. #2
    Join Date
    Jul 2001
    Posts
    416
    Rob,

    Search Download.com for "Ultimate Zip Cracker". Download.com says it's shareware, but there aren't many limitations. It gives me the full password for each Excel protected file I've tried.

    Good luck!

  3. #3
    Join Date
    Jul 2003
    Location
    UK
    Posts
    1,879
    http://www.password-find.com/softwar...l_password.php

    Thats for if you lost your password. I can't really work out what the problem is from your post, and I'm unsure if you've lost your password, or if you've lost the VBA coding...

  4. #4
    Join Date
    Dec 2003
    Location
    Miami, FL
    Posts
    3,262
    Thanks!

    Co-Worker had it saved somewhere (she doesn't know how).

    Here it is incase anyone is interested:


    Sub PasswordBreaker()
    'Author unknown
    'Breaks worksheet password protection.
    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)
    Exit Sub
    End If
    Next: Next: Next: Next: Next: Next
    Next: Next: Next: Next: Next: Next
    End Sub
    Company policy is to always protect an excel sheet (it's automatic), but you have NO Idea how many times people forget their passwords! This script is a life (and work) saver!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •