LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Wrong password - Why?

Hi

Why does this code give me the wrong password?
The msgbox says "105" instead of "124".
And the crazy thing is, that Excel unprotect the password with 105.
Can somebody explain me that phenomena?

Sub Passwort()
Dim i As Integer
ActiveSheet.Protect Password:=124
On Error Resume Next
For i = 1 To 110
ActiveSheet.Unprotect Password:=i
If ActiveSheet.ProtectContents = False Then
MsgBox "The Password is: " & i
Exit For
End If
Next i
End Sub

Thank's
John


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ad intelligence password wrong Chops Excel Discussion (Misc queries) 0 November 11th 08 01:53 PM
wrong password Josh C Excel Discussion (Misc queries) 1 June 22nd 07 07:22 PM
How to delete spreadsheet if wrong password entered? Mike[_104_] Excel Programming 0 November 1st 05 09:26 PM
Password box to remain open after wrong input Twanny Excel Discussion (Misc queries) 4 September 1st 05 09:29 PM
after entering certain number of times wrong password file can cur Rao Ratan Singh Excel Discussion (Misc queries) 1 August 28th 05 04:51 PM


All times are GMT +1. The time now is 02:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"