




下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、1打 2工 3停 4工 5刪 Pu Co Co A N Co Co Co t Co n DB DB DB p o m Co s Co w P Cod p J Co S T N t N Co p DB f s o Co p AL Di Di Di Di Di Di Ap Wi Wi En Sh Fo Sh Ne If Ms Ex En Ms If Ms El On Do Fo Fo Fo Fo.U Ch Ch If .P PW Ch Ch Ms $ Ex En En Ne Ne Lo On En If Ms Ex En On Fo A w1 Ne On Sh Fo C Sh Ne If Fo W
2、i If On Do Fo Fo Fo Fo .U Ch ChPW Ch Ch Ms $ l Fo w2 Ne Ex En Ne Ne Lo On En En Ne En Ms En 6關(guān)一個excel文檔要修改其中的內(nèi)容,可是被保護(hù)了,找了一堆破解軟件,要么需要購買,要 么是破解打開密碼的,非保護(hù)密碼。好不容易找到解決方案!1打開文件2工具-宏-錄制新宏-輸入名字如:aa3停止錄制(這樣得到一個空宏4工具-宏-宏,選aa,點(diǎn)編輯按鈕5刪除窗口中的所有字符(只有幾個,替換為下面的內(nèi)容:Public Sub AllInternalPasswords( Breaks worksheet and w
3、orkbook 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 Reveals has
4、hed passwords NOT original passwordsConst DBLSPACE As String = vbNewLine & vbNewLineConst AUTHORS As String = DBLSPACE & vbNewLine & _Adapted from Bob McCormick base code by & _Norman Harker and JE McGimpseyConst HEADER As String = AllInternalPasswords User MessageConst REPBACK As String = DBLSPACE
5、& Please report failure & _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 f
6、or a reason. Dont stuff up crucial formulas & _or data. & DBLSPACE & Access and use of some data & _may be an offense. If in doubt, dont.Const MSGNOPWORDS1 As String = There were no passwords on & _sheets, or workbook structure or windows. & AUTHORS & VERSIONConst MSGNOPWORDS2 As String = There was
7、no protection to & _workbook structure or windows. & DBLSPACE & _Proceeding to unprotect sheets. & AUTHORS & VERSIONConst 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
8、 computers 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 ot
9、her 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
10、& _ 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 & REPBA
11、CK 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.Scre
12、enUpdating = 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, vbInformat
13、ion, 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: F
14、or 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(i
15、2 & 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
16、 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.
17、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 Fo
18、r 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 Bypa
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年云計算服務(wù)模式創(chuàng)新與市場競爭格局預(yù)測研究報告
- 2025年元宇宙社交平臺虛擬現(xiàn)實(shí)社交場景構(gòu)建與用戶體驗(yàn)研究
- 2025屆云南省云南大附中(一二一校區(qū))八年級英語第二學(xué)期期中質(zhì)量檢測試題含答案
- 四川省錦江區(qū)七中學(xué)育才2025年英語八下期中復(fù)習(xí)檢測試題含答案
- 2025年醫(yī)院信息化建設(shè)醫(yī)療質(zhì)量管理評估報告
- 2025年醫(yī)藥企業(yè)研發(fā)外包(CRO)與臨床試驗(yàn)數(shù)據(jù)安全與隱私保護(hù)法規(guī)解讀報告
- 2025年醫(yī)藥流通行業(yè)供應(yīng)鏈與成本控制策略創(chuàng)新研究報告
- 2025年醫(yī)藥流通行業(yè)供應(yīng)鏈優(yōu)化與成本控制管理創(chuàng)新報告
- 2025年數(shù)字貨幣行業(yè)監(jiān)管政策對加密貨幣市場的影響報告001
- 保潔安全培訓(xùn)試題及答案
- qc技術(shù)主管述職報告
- 護(hù)患溝通及糾紛防范
- 人工動靜脈瘺狹窄查房
- PTBD管路維護(hù)技術(shù)
- 220kV變電運(yùn)行中的故障排除方法
- 高壓滅菌器應(yīng)急預(yù)案
- 環(huán)衛(wèi)車輛交通安全知識講座
- 學(xué)生頂崗實(shí)習(xí)成績考核表
- NB-T 47013.15-2021 承壓設(shè)備無損檢測 第15部分:相控陣超聲檢測
- 保安報名表和資格審查表
- 2023年黃岡市團(tuán)風(fēng)縣社區(qū)工作者招聘考試真題
評論
0/150
提交評論