Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Nov 2001
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Password protected sheet (Excel 97 SR2)

    Hi All;

    I have inherited a spreadsheet from someone who protected the sheet. They have a password in place to remove the protection. Is there a way to find out the password, or to remove the protection without it?

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Password protected sheet (Excel 97 SR2)

    See "Find Lost Password" (which isn't exactly what it does) on this Ehlrandsen Data Consulting site.
    -John ... I float in liquid gardens
    UTC -7ąDS

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Password protected sheet (Excel 97 SR2)

    In addition to John's link, try Elcomsoft, where an advanced Password recovery utility is available.

    Andrew C

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Password protected sheet (Excel 97 SR2)

    Another way to 'break' the password protection on a protected worksheet, as distinct from a proteced file, is to run the macro below, which I found at:
    http://j-walk.com/ss/excel/faqs/pw.txt.
    This macro both unlocks the sheet and gives you the string of characters it used to achieve this - which probably won't be anything like what the original user used. Put it down to the poor algorithm used by MS.

    Cheers

    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
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #5
    2 Star Lounger
    Join Date
    Dec 2000
    Posts
    140
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password protected sheet (Excel 97 SR2)

    I happened to stumble over this security flaw (97 SR2, do not know if it was patched)

    <pre>Sub UnprotectActiveSheet()
    'Exploits a rather exotic security flaw to unprotect any workSHEET (97 SR2)

    Dim sDlgTitle As String
    sDlgTitle = "Sub UnprotectActiveSheet"
    With ActiveSheet
    If .ProtectContents = True Then
    'First pre-requisite
    .Protect userInterfaceOnly:=True
    'Second pre-requisite. Assumes all 'very last cells' are not used
    ActiveWorkbook.Worksheets.FillAcrossSheets .range("IV65536")
    'Check whether trick was sucessfull
    If .ProtectContents = False Then
    'Trumpet it
    MsgBox "Protection of " & .Name & " was set to " & .ProtectContents, _
    vbInformation, sDlgTitle
    Else
    'Case security flaw will be patched
    MsgBox "Protection of " & .Name & " could not be removed", vbCritical, sDlgTitle
    End If
    Else
    MsgBox .Name & " was not protected to start with !", vbExclamation, sDlgTitle
    End If
    End With
    End Sub
    </pre>


Posting Permissions

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