去除excel工作表保護密碼_第1頁
去除excel工作表保護密碼_第2頁
去除excel工作表保護密碼_第3頁
去除excel工作表保護密碼_第4頁
去除excel工作表保護密碼_第5頁
已閱讀5頁,還剩1頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、方法1打開文件2工具-宏錄制新宏-輸入名字如:aa3停止錄制(這樣得到一個空宏4工具-宏宏,選aa,點編輯按鈕5刪除窗口中的所有字符(只有幾個),替換為下面的內容:(復制吧)6關閉編輯窗口7工具宏宏,選AllInternalPasswords,運行,確定兩次,等2分鐘,再確定.OK,沒有密碼了!內容如下:PublicSubAllInternalPasswords()Breaksworksheetandworkbookstructurepasswords.BobMcCormickprobablyoriginatorofbasecodealgorithmmodifiedforcoverageofw

2、orkbookstructure/windowspasswordsandformultiplepasswordsNormanHarkerandJEMcGimpsey27-Dec-2002(Version1.1)Modified2003-Apr-04byJEM:Allmsgstoconstants,andeliminateoneExitSub(Version1.1.1)RevealshashedpasswordsNOToriginalpasswordsConstDBLSPACEAsString=vbNewLine&vbNewLineConstAUTHORSAsString=DBLSPACE&vb

3、NewLine&_AdaptedfromBobMcCormickbasecodeby&_NormanHarkerandJEMcGimpseyConstHEADERAsString=AllInternalPasswordsUserMessageConstVERSIONAsString=DBLSPACE&Version1.1.12003-Apr-04ConstREPBACKAsString=DBLSPACE&Pleasereportfailure&_grammingnewsgroup.ConstALLCLEARAsString=DBLSPACE&Theworkbookshould&_nowbefr

4、eeofallpasswordprotection,somakesureyou:&_DBLSPACE&SAVEITNOW!&DBLSPACE&andalso&_DBLSPACE&BACKUP!,BACKUP!,BACKUP!&_DBLSPACE&Also,rememberthatthepasswordwas&_putthereforareason.Dontstuffupcrucialformulas&_ordata.&DBLSPACE&Accessanduseofsomedata&_maybeanoffense.Ifindoubt,dont.ConstMSGNOPWORDS1AsString=

5、Therewerenopasswordson&_sheets,orworkbookstructureorwindows.&AUTHORS&VERSIONConstMSGNOPWORDS2AsString=Therewasnoprotectionto&_workbookstructureorwindows.&DBLSPACE&_Proceedingtounprotectsheets.&AUTHORS&VERSIONConstMSGTAKETIMEAsString=AfterpressingOKbuttonthis&_willtakesometime.&DBLSPACE&Amountoftime&

6、_dependsonhowmanydifferentpasswords,the&_passwords,andyourcomputersspecification.&DBLSPACE&_Justbepatient!Makemeacoffee!&AUTHORS&VERSIONConstMSGPWORDFOUND1AsString=YouhadaWorksheet&_StructureorWindowsPasswordset.&DBLSPACE&_Thepasswordfoundwas:&DBLSPACE&$&DBLSPACE&_Noteitdownforpotentialfutureuseinot

7、herworkbooksby&_thesamepersonwhosetthispassword.&DBLSPACE&_Nowtocheckandclearotherpasswords.&AUTHORS&VERSIONConstMSGPWORDFOUND2AsString=YouhadaWorksheet&_passwordset.&DBLSPACE&Thepasswordfoundwas:&_DBLSPACE&$&DBLSPACE&Noteitdownforpotential&_futureuseinotherworkbooksbysamepersonwho&_setthispassword.

8、&DBLSPACE&Nowtocheckandclear&_otherpasswords.&AUTHORS&VERSIONConstMSGONLYONEAsString=Onlystructure/windows&protectedwiththepasswordthatwasjustfound.&_ALLCLEAR&AUTHORS&VERSION&REPBACKDimw1AsWorksheet,w2AsWorksheetDimiAsInteger,jAsInteger,kAsInteger,lAsIntegerDimmAsInteger,nAsInteger,i1AsInteger,i2AsI

9、ntegerDimi3AsInteger,i4AsInteger,i5AsInteger,i6AsIntegerDimPWord1AsStringDimShTagAsBoolean,WinTagAsBooleanApplication.ScreenUpdating=FalseWithActiveWorkbookWinTag=.ProtectStructureor.ProtectWindowsEndWithShTag=FalseForEachw1InWorksheetsShTag=ShTagorw1.ProtectContentsNextw1IfNotShTagAndNotWinTagThenM

10、sgBoxMSGNOPWORDS1,vbInformation,HEADERExitSubEndIfMsgBoxMSGTAKETIME,vbInformation,HEADERIfNotWinTagThenMsgBoxMSGNOPWORDS2,vbInformation,HEADERElseOnErrorResumeNextDodummydoloopFori=65To66:Forj=65To66:Fork=65To66Forl=65To66:Form=65To66:Fori1=65To66Fori2=65To66:Fori3=65To66:Fori4=65To66Fori5=65To66:Fo

11、ri6=65To66:Forn=32To126WithActiveWorkbook.UnprotectChr(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=FalseAnd_.ProtectWindows=FalseThenPWord1=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

12、Application.Substitute(MSGPWORDFOUND1,_$,PWord1),vbInformation,HEADERExitDoBypassallfor.nextsEndIfEndWithNext:Next:Next:Next:Next:NextNext:Next:Next:Next:Next:NextLoopUntilTrueOnErrorGoTo0EndIfIfWinTagAndNotShTagThenMsgBoxMSGONLYONE,vbInformation,HEADERExitSubEndIfOnErrorResumeNextForEachw1InWorkshe

13、etsAttemptclearancewithPWord1w1.UnprotectPWord1Nextw1OnErrorGoTo0ShTag=FalseForEachw1InWorksheetsChecksforallclearShTagtriggeredto1ifnot.ShTag=ShTagorw1.ProtectContentsNextw1IfShTagThenForEachw1InWorksheetsWithw1If.ProtectContentsThenOnErrorResumeNextDoDummydoloopFori=65To66:Forj=65To66:Fork=65To66F

14、orl=65To66:Form=65To66:Fori1=65To66Fori2=65To66:Fori3=65To66:Fori4=65To66Fori5=65To66:Fori6=65To66:Forn=32To126.UnprotectChr(i)&Chr(j)&Chr(k)&_Chr(l)&Chr(m)&Chr(i1)&Chr(i2)&Chr(i3)&_Chr(i4)&Chr(i5)&Chr(i6)&Chr(n)IfNot.ProtectContentsThenPWord1=Chr(i)&Chr(j)&Chr(k)&Chr(l)&_Chr(m)&Chr(i1)&Chr(i2)&Chr(i3)&_Chr(i4)&Chr(i5)&Chr(i6)&Chr(n)MsgBoxApplication.Substitute(MSGPWORDFOUND2,_$,PWord1),vbInformation,HEADERleveragefindingPwordbytryingonothersheetsForEachw2InWorks

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論