Forgot Password? Recover Excel Sheet Protection with this Code
1. Forgot password for protected sheet on Microsoft Excel!?
In the blank sheet copy the actual code below then push the particular Play button. The idea should
retrieve your password quickly.
Public Sub AllInternalPasswords()
'Breaks worksheet and workbook construction passwords.
'Bob McCormick possibly originator regarding base code algorithm
'Modified with regard to coverage involving workbook structure / windows
'passwords as well as for multiple passwords
'Norman Harker along with JE McGimpsey 27-Dec-2002
'Reveals passwords NOT "the" passwords
Const DBLSPACE While String = vbNewLine & vbNewLine
Dim Mess Since String, Header While String
Dim Authors Since String, Variation Since String
Dim RepBack As String, AllClear As String
Dim PWord1 Because String
Dim ShTag Because Boolean, WinTag While Boolean
Dim w1 Since Worksheet, w2 Because Worksheet
Dim i While Integer, j Since Integer, k While Integer, l As Integer
Dim m Since Integer, n Because Integer, i1 As Integer, i2 As Integer
Dim i3 Since Integer, i4 As Integer, i5 Since Integer, i6 Because Integer
Application.ScreenUpdating = False
Header = "AllInternalPasswords User Message"
2. Authors = DBLSPACE & vbNewLine & "Adapted coming from Bob " & _
"McCormick base code by simply Norman Harker " & _
"and JE McGimpsey"
Version = DBLSPACE & "Version 1.1 27-Dec-2002"
RepBack = DBLSPACE & "Please statement achievement or even " & _
"failure back for you to newsgroup."
AllClear = DBLSPACE & "The workbook should now " & _
"be free associated with charge of most password protection thus " & _
"make positive you:" & DBLSPACE & _
"SAVE IT NOW!" & DBLSPACE & _
"and also" & DBLSPACE & _
"BACKUP!, BACKUP!!, BACKUP!!!" & DBLSPACE & _
"Also, understand that the particular password " & _
"was put there for any reason. In case in doubt, don't."
With ActiveWorkbook
WinTag = .ProtectStructure Or Perhaps .ProtectWindows
End With
ShTag = False
For each w1 in Worksheets
3. ShTag = ShTag or w1.ProtectContents
Next w1
If Not Necessarily ShTag Rather Than WinTag Then
Mess = "There had been simply no passwords on sheets, as well as workbook " & _
"structure as well as windows." & Authors & Version
MsgBox Mess, vbInformation, Header
Exit Sub
End If
Mess = "After pressing OK button this will try using some time." & _
DBLSPACE & "Amount of energy depends on how " & _
"many distinct passwords, the particular passwords, and" & _
"your computer's specification." & DBLSPACE & _
"Just be patient! Help Make me the coffee!" & _
Authors & Version
MsgBox Mess, vbInformation, Header
If Certainly Not WinTag Then
Mess = "There ended up being no protection to workbook structure " & _
"or windows." & DBLSPACE & _
"Proceeding for you to unprotect sheets." & _
Authors & Version
MsgBox Mess, vbInformation, Header
Else
On Error Resume Next
Do 'dummy do loop
For i = 65 To be Able To 66: for j = 65 to 66: Regarding k = 65 To Always Be Able To 66
For l = 65 For You To 66: Regarding m = 65 In Order To 66: Regarding i1 = 65 In Order To 66
4. For i2 = 65 For You To 66: for i3 = 65 to 66: Pertaining To i4 = 65 For You To 66
For i5 = 65 To Always Be Able To 66: for i6 = 65 For You To 66: Regarding n = 32 For You To 126
With ActiveWorkbook
.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 .ProtectStructure = False online backup solutions and _
.ProtectWindows = False Then
PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _
Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
Mess = "You stood a Worksheet structure or even " & _
"Windows Password set." & DBLSPACE & _
"The password located was: " & DBLSPACE & _
PWord1 & DBLSPACE & "Note it down for " & _
"potential future used in some other " & _
"workbooks simply by same person who set this " & _
"password." & DBLSPACE & _
"Now to test as well as clear various other passwords." & _
Authors & Version
MsgBox Mess, vbInformation, Header
Exit Perform 'Bypass just about all for...nexts
End If
End With
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
5. Loop Until True
On Error GoTo 0
End If
If WinTag Rather Than ShTag Then
Mess = "Only composition / windows protected along with " & _
"the password which was just found." & _
AllClear & Authors & Model & RepBack
MsgBox Mess, vbInformation, Header
Exit Sub
End If
On Error Resume Next
For each w1 in Worksheets
'Attempt clearance with PWord1
w1.Unprotect PWord1
Next w1
On Error GoTo 0
ShTag = False
For each w1 Throughout Worksheets
'Checks pertaining to almost all distinct ShTag triggered to at the particular really least one if not.
ShTag = ShTag As Well As w1.ProtectContents
Next w1
If Not Necessarily ShTag Then
Mess = AllClear & Authors & Variation & RepBack
MsgBox Mess, vbInformation, Header
Exit Sub
End If
6. For each w1 Within Worksheets
With w1
If .ProtectContents Then
On Error Resume Next
Do 'Dummy do loop
For i = 65 In Order To 66: Regarding j = 65 to 66: for k = 65 In Order To 66
For l = 65 to 66: Regarding m = 65 In Order To 66: Regarding i1 = 65 In Order To 66
For i2 = 65 For You To 66: Regarding i3 = 65 In Order To 66: Regarding i4 = 65 For You To 66
For i5 = 65 For You To 66: Regarding i6 = 65 In Order To 66: Regarding n = 32 For You To 126
.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 Certainly Not .ProtectContents Then
PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _
Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
Mess = "You stood a Worksheet password set." & _
DBLSPACE & "The password found was: " & _
DBLSPACE & PWord1 & DBLSPACE & _
"Note it down with regard to possible long term use " & _
"in various other workbooks simply by same one who " & _
"set this password." & DBLSPACE & _
"Now to test and clear additional passwords." & _
Authors & Version
MsgBox Mess, vbInformation, Header
'leverage locating Pword by simply sampling additional sheets
7. For Each As Well As Every w2 Within Worksheets
w2.Unprotect PWord1
Next w2
Exit Carry out 'Bypass most for...nexts
End If
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
Loop Until True
On Error GoTo 0
End If
End With
Next w1
Mess = AllClear & Authors & Variation & RepBack
MsgBox Mess, vbInformation, Header
End Sub
https://uk.answers.yahoo.com/question/index?qid=20070611060152AAZ8Nfy
Hello, there's a pair of way to recover the actual data.
- one would be to copy all of the data to any different sheet.
- Another way http://www.files32.com/Data-Security.asp is to run any macro to recover the actual
password.
Here's how:
<---Debut associated with Code - Copy/Paste in between only--->
<---End involving Code - Copy/Paste inside between only--->
The code is lengthy but functions actually well.. in Excel, select tools --> Macro --> Visual basic
Editor. Don't " & _
"stuff up crucial formulas or data." & _
DBLSPACE & "Access and employ regarding some data may" & _