Strange Sheet Protection Password prob.

Haluk

Rules Violation
Joined
Oct 26, 2002
Messages
1,075
Hi all;

I've encountered a strange problem with sheet protection.

The situation is;

- When a sheet is protected with a password = 250 , the sheet protection can be removed by an unprotect password as 212

- Similarly when the sheet is protected by a password 212, the protection can be removed by the password 250

- And the same situation is also true with the passwords 251 and 213 and vice versa.

Is there any idea what's going on with this ?
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi, Excel's sheet protection is slightly more secure than a wet paper bag. Do a search for password on this site and read the results. If you use a password ******* such as the one below (found on this site), it will unprotect the sheet by finding an alternative password usually using just "A"s and "B"s.

Someone else may be able to come up with a technical explanation about algorithms and such-like but the phenomenon you describe comes as no surprise.

Sub PasswordBreaker()

'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
 
Upvote 0
Thx for the quick responses.

@inarbeth:

I know the code you've supplied, which was posted by Bob McCormick on NG: microsoft.public.excel.misc on 22 May 2001. Thanks for your info.

@Andrew Poulsom:

The link you've supplied is very valuable. Thanks for your interest about my question. I'll study the info @ the link where the pheonomena of the encryption of XL passw's is analyzed very well. Thanks again.
 
Upvote 0

Forum statistics

Threads
1,212,927
Messages
6,110,697
Members
448,293
Latest member
jin kazuya

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top