破解EXCEL工作表保護的方法

1\打開文件

2\工具---宏----錄制新宏---輸入名字如:aa

3\停止錄制(這樣得到一個空宏)

4\工具---宏----宏,選aa,點編輯按鈕

5\刪除窗口中的所有字符(只有幾個),替換爲下面的內容:(你複制吧)

Option Explicit

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 microsoft.public.excel.programming 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

Application.ScreenUpdating = False

With ActiveWorkbook

WinTag = .ProtectStructure Or .ProtectWindows

End With

ShTag = False

For Each w1 In Worksheets

ShTag = ShTag Or w1.ProtectContents

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

.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 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)

MsgBox Application.Substitute(MSGPWORDFOUND1, _

"$$", PWord1), vbInformation, HEADER

Exit Do 'Bypass all for...nexts

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

w1.Unprotect 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 w1.ProtectContents

Next w1

If ShTag Then

For Each w1 In Worksheets

With w1

If .ProtectContents 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

.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 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)

MsgBox Application.Substitute(MSGPWORDFOUND2, _

"$$", PWord1), vbInformation, HEADER

'leverage finding Pword by trying on other sheets

For Each w2 In Worksheets

w2.Unprotect PWord1

Next w2

Exit Do 'Bypass all 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

End If

MsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER

End Sub

6\關閉編輯窗口

7\工具---宏-----宏,選AllInternalPasswords,運行,確定兩次,等2分鍾,再確定.OK,沒有密碼了!!

Excel動畫圖解:保護Excel工作簿
     如果我們不希望別人采取前面的方法整體移動或複制工作表,我們就將工作簿保護起來。  啓動Excel,打開需要保護的工作簿文檔,執行“工具→保護→保護工作簿”命令,打開“保護工作...查看完整版>>Excel動畫圖解:保護Excel工作簿
 
Excel單元格內容、行列、工作表的隱藏方法
Excel單元格內容、行列、工作表的隱藏方法
  要隱藏Excel表格的內容有很多方法,現在我們給大家介紹Excel單元格內容、行列、工作表的隱藏方法。   隱藏單元格內容   選中要隱藏內容的單元格區域,右擊選擇“設置單元格格式”,在“數值”選項卡的“分類...查看完整版>>Excel單元格內容、行列、工作表的隱藏方法
 
Word 2007制作論文的保護與破解
  用Word2007制作一篇好的論文,往往凝聚著作者的諸多心血,自然不希望他人剽竊。但在撰寫的過程中又希望能參考他人的資料。這一對看似矛盾的綜合體,就構成了撰寫論文的“二重奏”。怎樣才能演好這二重奏呢?本文將...查看完整版>>Word 2007制作論文的保護與破解
 
破解Word密碼保護的簡單方法
  在使用Word進行文件保護時,我們經常會使用到窗體保護(工具->保護文檔),用窗體保護最爲徹底,用戶無法編輯,也無法進行Copy&Paste操作,前幾天發布的Word文檔的漏洞可以讓你用很簡單的方法去掉這個密碼...查看完整版>>破解Word密碼保護的簡單方法
 
SA空口令破解和保護
老早就想寫這篇文章了,爲什麽呢?因爲至從在灰色軌迹看到COOLCAT的那篇《肉機保護術一》後,天天晚上就睡不著,感覺是不錯,但總覺得好象有破綻,苦思苦想後,終于明白了,還是有很多破解方法和保護方法的,哈,但是最...查看完整版>>SA空口令破解和保護
 
VB編程破解Windows屏幕保護密碼
大家都知道,屏幕保護密碼最多爲16個字符。微軟內置了16字節的密鑰:48 EE 76 1D 67 69 A1 1B 7A 8C 47 F8 54 95 97 5F。Windows便用上述密鑰加密你輸入的密碼。其加密過程爲:首先將你輸入的密碼字符逐位轉換爲其16...查看完整版>>VB編程破解Windows屏幕保護密碼
 
破解Windows屏幕保護密碼
作者:田茂均   大家都知道,屏幕保護密碼最多爲16個字符。微軟內置了16字節的密鑰:48 EE 76 1D 67 69 A1 1B 7A 8C 47 F8 54 95 97 5F。Windows便用上述密鑰加密你輸入的密碼。其加密過程爲:首先將你輸入的密碼字...查看完整版>>破解Windows屏幕保護密碼
 
打開“保護之門”—破解網頁限制功能
我們經常到網上浏覽一些與教學相關的網頁,有一些精彩的網頁、圖片或動畫,我們常常將它們保存下來。方法一般是:IE菜單欄中的“文件/另存爲”功能可以保存精彩網頁;右鍵快捷菜單“圖片另存爲”功能可以保存精美圖片...查看完整版>>打開“保護之門”—破解網頁限制功能
 
Access數據庫與Excel工作簿巧轉換-MSOFFICE
  學校領導布置給小馬一個“艱巨”的任務,要他將本校校友錄中收集的校友電子郵件地址以Excel文件的形式提交上去,以方便群發邀請各位校友參加八十周年校慶。學校校友錄數據庫是Access的MDB格式,其中包含多個表,...查看完整版>>Access數據庫與Excel工作簿巧轉換-MSOFFICE
 
 
回到王朝網路移動版首頁