Page 1 of 2 12 LastLast
Results 1 to 15 of 20

Thread: Passwords

  1. #1
    Star Lounger
    Join Date
    Feb 2001
    Location
    South Carolina, USA
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Passwords

    I have been working in a spreadsheet that contains confidential information. I password protected so the user would need to enter a password to open the file. I have forgotten the password. Is there away around this problem?

    Thanks

  2. #2
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Passwords

    Deborah,

    Microsoft never claimed that the password protection of their spreadsheets was bulletproof (if this is the correct word in English for this). You can write your own code to unprotect your spreadsheet (that doesn't mean that you'll obtain the password, but the problem is solved anyhow). I add some code that I wrote to experiment with unprotecting the active spreadsheet. The code is limited in the sense that it has to be adapted if the password has more than 5 characters. What the code does is actually very simple: it tries all kind of combinations, trying to unprotect the sheet.

    Sub Cracker()
    Dim h As Integer
    Dim i As Integer
    Dim j As Integer
    Dim k As Integer
    Dim l As Integer
    Dim pwd As String
    Dim tijd, delay
    tijd = Time
    Application.StatusBar = Format$(Time - tijd, "hh:mm:ss")
    '1 kar
    For l = 32 To 255
    pwd = Chr$(l)
    On Error Resume Next
    ActiveSheet.Unprotect (pwd)
    If Err = 0 Then
    MsgBox "Spreadsheet unprotected"
    On Error GoTo 0
    Exit Sub
    Else
    On Error GoTo 0
    End If
    Next l
    Application.StatusBar = Format$(Time - tijd, "hh:mm:ss")
    '2 kar
    For k = 2 To 1 Step -1
    Application.StatusBar = Format$(Time - tijd, "hh:mm:ss")
    For l = 32 To 96
    pwd = Chr$(k) & Chr$(l)
    On Error Resume Next
    ActiveSheet.Unprotect (pwd)
    If Err = 0 Then
    MsgBox "Spreadsheet unprotected"
    On Error GoTo 0
    Exit Sub
    Else
    On Error GoTo 0
    End If
    Next l
    Next k
    '3 kar
    For j = 2 To 1 Step -1
    For k = 2 To 1 Step -1
    Application.StatusBar = Format$(Time - tijd, "hh:mm:ss")
    For l = 32 To 96
    pwd = Chr$(j) & Chr$(k) & Chr$(l)
    On Error Resume Next
    ActiveSheet.Unprotect (pwd)
    If Err = 0 Then
    MsgBox "Spreadsheet unprotected"
    On Error GoTo 0
    Exit Sub
    Else
    On Error GoTo 0
    End If
    Next l
    Next k
    Next j
    '4 kar
    For i = 2 To 1 Step -1
    For j = 2 To 1 Step -1
    For k = 2 To 1 Step -1
    Application.StatusBar = Format$(Time - tijd, "hh:mm:ss")
    For l = 32 To 96
    pwd = Chr$(i) & Chr$(j) & Chr$(k) & Chr$(l)
    On Error Resume Next
    ActiveSheet.Unprotect (pwd)
    If Err = 0 Then
    MsgBox "Spreadsheet unprotected"
    On Error GoTo 0
    Exit Sub
    Else
    On Error GoTo 0
    End If
    Next l
    Next k
    Next j
    Next i
    '5 kar
    For h = 2 To 1 Step -1
    For i = 2 To 1 Step -1
    For j = 2 To 1 Step -1
    For k = 2 To 1 Step -1
    Application.StatusBar = Format$(Time - tijd, "hh:mm:ss")
    For l = 32 To 96
    pwd = Chr$(h) & Chr$(i) & Chr$(j) & Chr$(k) & Chr$(l)
    On Error Resume Next
    ActiveSheet.Unprotect (pwd)
    If Err = 0 Then
    MsgBox "Spreadsheet unprotected"
    On Error GoTo 0
    Exit Sub
    Else
    On Error GoTo 0
    End If
    Next l
    Next k
    Next j
    Next i
    Next h
    Application.StatusBar = ""
    End Sub

  3. #3
    Star Lounger
    Join Date
    Feb 2001
    Location
    South Carolina, USA
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Passwords

    Thanks for the information. I am anxious to try it out, however, where do I put the code? Do I create a blank spreadsheet and type in the code in a VBA module? Sorry for being so slow.....

    I appreciate your help!

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    352
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Passwords

    Password crackers are available (for money) at

    http://www.LostPassword.com

    From an advert in Woody's Office Watch
    David Grugeon
    Brisbane Australia

  5. #5
    Azri1
    Guest

    Re: Passwords sent it to me..

    just sent your file to me via :

    boymoii@hotmail.com

    and i unlocked it for u..bye

    ps: plz zip the file using winzip..kif its a big file

  6. #6
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Passwords

    Deborah,

    I see that you've got some interesting suggestions from other people. You can indeed find all kind of cracker software for Excel spreadsheets and add-ins on the web. The code that I gave to you can simply be pasted into a module and then from the Excel >> Tools >> Macro menu be run. There is not danger of anything. If it takes too long just interrupt it by using ctrl break. The only thing the code does is making a password, try to unprotect the sheet with that password, if not successful, a new password is tried out etc., until the spreadsheet is unprotected.

  7. #7
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Passwords

    and make the protected worksheet active before you run the macro (it actually applies on the active worksheet)

  8. #8
    stevenh
    Guest

    Re: Passwords

    Hello Hans
    I have the same problem as Debora. How can I apply your code if I can't get the file open at all.

    Please help

    Steven

  9. #9
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Reading/Swindon, Berkshire, United Kingdom
    Posts
    664
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Passwords

    There is a difference between worksheet/workbook protection and "open the file" passwording. Protection is basically to eanble you to stop yourself or users from doing things you don't want to, either accidentally or on purpose, whereas "open" passwording a workbook either prevents access or stops you saving over the active copy. Because protection can utilise passwords, the two can become confused.

    I have some home-grown code that is similar to Hans' but goes for the "Open" password as opposed to the protection password but it is very slow so I won't post it. However, he does build his password string differently to mine and that may speed things up. If you're prepared to spend money then the link above - or any mentioned at <A target="_blank" HREF=http://www.j-walk.com>j-walk</A> should get you on your way.

    Brooke

  10. #10
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Passwords

    Steven,

    As Brooke said, my code works only for open workbooks with protected worksheets. You need to buy a password cracker if you want to recover your workbook. Some of these crackers have trial versions which allow you to find the first three characters of your password. Maybe this is sufficient for you to remember the whole password. Have a look at the websites mentioned in this thread.

  11. #11
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Reading/Swindon, Berkshire, United Kingdom
    Posts
    664
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Passwords

    I went back and had a proper look at your code.

    How did you discover that? and while I'm asking questions, why "2 to 1 step -1" instead of "1 to 2"?

    Brooke

  12. #12
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Passwords

    It's quite a while ago that I wrote this code. Excel has a strange way to deal with passwords. Actually, your spreadsheet password is not unique. There are many other passwords (with the same length, that's important) that will unprotect your spreadsheet. My code does not discover your password, but will unprotect the sheet. The 'other' passwords may also contain control characters. I discovered via trial-and-error that the execution time could be shortened by restricting to the combinations that are actually in the code. I can't remember why I used "2 to 1", maybe it'll work with "1 to 2". Just try it out, byt protecting a sheet with a small e.g. 4-letter password, run the code and see if it is possible to unprotect the sheet.

  13. #13
    Platinum Lounger
    Join Date
    Jan 2001
    Posts
    3,788
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Passwords

    For a free add-in that can find lost passwords for excel (but not vba modules) try this site from Erlandsen Data Consulting.
    <A target="_blank" HREF=http://www.erlandsendata.no/english/downloads/tools.htm>http://www.erlandsendata.no/english/downloads/tools.htm</A>

    Tony

  14. #14
    Azri1
    Guest

    Deborah..just sent your file to me n I'll help u..

    ok...if u really want help..just offering...bye

  15. #15
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Reading/Swindon, Berkshire, United Kingdom
    Posts
    664
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deborah..just sent your file to me n I'll help u..

    Azri,

    Any chance you could open this workbook?

    Go ahead......

    Brooke
    Attached Files Attached Files

Page 1 of 2 12 LastLast

Posting Permissions

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