如何破解EXCEL工作表保護密碼忘記密碼怎麼辦
EXCEL工作表保護密碼忘記密碼怎麼辦,快速學起來
操作方法
新建一個EXCEL工作表,而後點擊另存為,講表格保存為啟用宏的工作表
一次點擊開發工具---錄製新宏,在彈出的對話框內修改宏名稱而後確定
依次點擊開發工具----停止錄製宏,宏錄製完成
依次點擊開發工具,---宏----在彈出的對話框找到我們剛才錄製的宏名稱而後進入VBA界面
在VBA界面,全選裏面的代碼,而後刪除,講裏面的代碼全部刪除完
代碼複製到VBA編輯窗口內
Public Sub AllInternalPassWords()
' Breaks worksheet and workbook structure passwords. Bob McCormick
' probably originator of base code algorithm modified for coverage
' of workbook structure / windows passwords and for multiple passwords
'
' Norman Harker and JE McGimpsey 27-Dec-2002 (Version 1.1)
' Modified 2003-Apr-04 by JEM: All msgs to constants, and
' eliminate one Exit Sub (Version 1.1.1)
' Reveals hashed passwords NOT original passwords
Const DBLSPACE As String = vbNewLine & vbNewLine
Const AUTHORS As String = DBLSPACE & vbNewLine & _
"Adapted from Bob McCormick base code by" & _
"Norman Harker and JE McGimpsey"
Const HEADER As String = "AllInternalPasswords User Message"
Const VERSION As String = DBLSPACE & "Version 1.1.1 2003-Apr-04"
Const REPBACK As String = DBLSPACE & "Please report failure " & _
"to the ramming newsgroup."
Const ALLCLEAR As String = DBLSPACE & "The workbook should " & _
"now be free of all password protection, so make sure you:" & _
DBLSPACE & "SAVE IT NOW!" & DBLSPACE & "and also" & _
DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _
DBLSPACE & "Also, remember that the password was " & _
"put there for a reason. Don't stuff up crucial formulas " & _
"or data." & DBLSPACE & "Access and use of some data " & _
"may be an offense. If in doubt, don't."
Const MSGNOPWORDS1 As String = "There were no passwords on " & _
"sheets, or workbook structure or windows." & AUTHORS & VERSION
Const MSGNOPWORDS2 As String = "There was no protection to " & _
"workbook structure or windows." & DBLSPACE & _
"Proceeding to unprotect sheets." & AUTHORS & VERSION
Const MSGTAKETIME As String = "After pressing OK button this " & _
"will take some time." & DBLSPACE & "Amount of time " & _
"depends on how many different passwords, the " & _
"passwords, and your computer's specification." & DBLSPACE & _
"Just be patient! Make me a coffee!" & AUTHORS & VERSION
Const MSGPWORDFOUND1 As String = "You had a Worksheet " & _
"Structure or Windows Password set." & DBLSPACE & _
"The password found was: " & DBLSPACE & "$$" & DBLSPACE & _
"Note it down for potential future use in other workbooks by " & _
"the same person who set this password." & DBLSPACE & _
"Now to check and clear other passwords." & AUTHORS & VERSION
Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _
"password set." & DBLSPACE & "The password found was: " & _
DBLSPACE & "$$" & DBLSPACE & "Note it down for potential " & _
"future use in other workbooks by same person who " & _
"set this password." & DBLSPACE & "Now to check and clear " & _
"other passwords." & AUTHORS & VERSION
Const MSGONLYONE As String = "Only structure / windows " & _
"protected with the password that was just found." & _
ALLCLEAR & AUTHORS & VERSION & REPBACK
Dim w1 As Worksheet, w2 As Worksheet
Dim i As Integer, j As Integer, k As Integer, l As Integer
Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer
Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer
Dim PWord1 As String
Dim ShTag As Boolean, WinTag As Boolean
enUpdating = False
With ActiveWorkbook
WinTag = ectStructure Or ectWindows
End With
ShTag = False
For Each w1 In Worksheets
ShTag = ShTag Or ectContents
Next w1
If Not ShTag And Not WinTag Then
MsgBox MSGNOPWORDS1, vbInformation, HEADER
Exit Sub
End If
MsgBox MSGTAKETIME, vbInformation, HEADER
If Not WinTag Then
MsgBox MSGNOPWORDS2, vbInformation, HEADER
Else
On Error Resume Next
Do 'dummy do loop
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
With ActiveWorkbook
otect 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 ectStructure = False And _
ectWindows = 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)
MsgBox titute(MSGPWORDFOUND1, _
"$$", PWord1), vbInformation, HEADER
Exit Do 'Bypass all s
End If
End With
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
Loop Until True
On Error GoTo 0
End If
If WinTag And Not ShTag Then
MsgBox MSGONLYONE, vbInformation, HEADER
Exit Sub
End If
On Error Resume Next
For Each w1 In Worksheets
'Attempt clearance with PWord1
otect PWord1
Next w1
On Error GoTo 0
ShTag = False
For Each w1 In Worksheets
'Checks for all clear ShTag triggered to 1 if not.
ShTag = ShTag Or ectContents
Next w1
If ShTag Then
For Each w1 In Worksheets
With w1
If ectContents Then
On Error Resume Next
Do 'Dummy do loop
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
otect 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 Not ectContents 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)
MsgBox titute(MSGPWORDFOUND2, _
"$$", PWord1), vbInformation, HEADER
'leverage finding Pword by trying on other sheets
For Each w2 In Worksheets
otect PWord1
Next w2
Exit Do 'Bypass all s
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
End If
MsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER
End Sub
點擊保存
點擊開發工具,宏,找到我們剛才錄製的宏,點擊執行宏
而後,在彈出的所有對話框上,都點擊確定,都確定,1分鐘後,就可以編輯了
特別提示
本方法僅適用於2007-2016版本
-
電腦上怎樣申請QQ號
很多人在打開電腦的時候,都會習慣登錄QQ跟別人聊天,如果沒有QQ賬號的話,可以在電腦上免費申請QQ號,或者之前的QQ號是別人給的,自己不喜歡,也可以重新申請一個新的QQ號,在這裏,跟大家分享一下在電腦上如何免費申請QQ號的方法。電腦上免費申請QQ號的步驟(01)在電腦上下載和...
-
QQ瀏覽器如何安裝應用插件
QQ瀏覽器如何安裝應用插件,瀏覽器的應用插件的安裝對我們來説是非常方便的。下面以安裝護眼導航應用為例,介紹如何安裝瀏覽器應用插件。操作方法(01)打開QQ瀏覽器,點擊右上角的“”+“”如圖所示(02)進入了安裝應用的首頁,如圖所示(03)比如安裝一個護眼的應用,鼠標停留在...
-
EPSON R230打印機清零軟件無法使用的解決方法
當EPSONR230打印機兩個紅燈閃爍,並提示“打印機的墨管已到它們的使用壽命”時就需要使用清零軟件進行處理,可是在我們使用清零軟件的過程中,總是出現這樣或那樣的問題。那麼我們在遇到這些問題時該如何解決呢?操作方法(01)首先當打開清零軟件可執行文件時,系統會彈出...
-
在Word文檔中怎麼樣進行簡繁體轉換?
字體有繁體和簡體之分,而Word文檔主要的功能是記錄保存文本文字,可能由於區域不一樣,有的喜歡用簡體有的喜歡用繁體,為了方便查看,就需要用到簡繁體的相互轉換了。操作方法(01)方法一:比較常用的,就是用Word文檔自帶的簡繁體轉換功能,找到審閲——簡轉繁——便可將選擇的...