資源描述:
《excel 宏破解方法》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫。
1、如何破解Excel的工作表保護今天學(xué)到了一招如何用宏破解Excel工作表保護的方法,拿來與大家共享一下。1、首先新建一個新的工作簿;2、然后選擇“工具”“宏”“VB編輯器”;3、進入到“VB編輯器”后雙擊左邊的Sheet1,在右邊的“代碼”編輯欄內(nèi)把下面的宏命令復(fù)制到里面;4、再把你要解除保護的EXCEL表打開;5、然后,返回到“VB編輯器”單擊上面工具欄的綠色“play”按鈕;6、接著,會出現(xiàn)一個對話框單擊“確定”,之后你等2、3分鐘后還會彈出一個對話框,這時你只需要連點兩次“確定”后你所需要解除保護的工作溥
2、內(nèi)的所有表就全部解除了。下面是這個宏的代碼:OptionExplicitPublicSubAllInternalPasswords()'Breaksworksheetandworkbookstructurepasswords.BobMcCormick'probablyoriginatorofbasecodealgorithmmodifiedforcoverage'ofworkbookstructure/windowspasswordsandformultiplepasswords''NormanHarkeran
3、dJEMcGimpsey27-Dec-2002(Version1.1)'Modified2003-Apr-04byJEM:Allmsgstoconstants,and'eliminateoneExitSub(Version1.1.1)'RevealshashedpasswordsNOToriginalpasswordsConstDBLSPACEAsString=vbNewLine&vbNewLineConstAUTHORSAsString=DBLSPACE&vbNewLine&_"AdaptedfromBobM
4、cCormickbasecodeby"&_"NormanHarkerandJEMcGimpsey"ConstHEADERAsString="AllInternalPasswordsUserMessage"ConstVERSIONAsString=DBLSPACE&"Version1.1.12003-Apr-04"ConstREPBACKAsString=DBLSPACE&"Pleasereportfailure"&_"tothemicrosoft.public.excel.programmingnewsgrou
5、p."ConstALLCLEARAsString=DBLSPACE&"Theworkbookshould"&_"nowbefreeofallpasswordprotection,somakesureyou:"&_DBLSPACE&"SAVEITNOW!"&DBLSPACE&"andalso"&_DBLSPACE&"BACKUP!,BACKUP!!,BACKUP!!!"&_DBLSPACE&"Also,rememberthatthepasswordwas"&_"putthereforareason.Don'tst
6、uffupcrucialformulas"&_"ordata."&DBLSPACE&"Accessanduseofsomedata"&_"maybeanoffense.Ifindoubt,don't."ConstMSGNOPWORDS1AsString="Therewerenopasswordson"&_"sheets,orworkbookstructureorwindows."&AUTHORS&VERSIONConstMSGNOPWORDS2AsString="Therewasnoprotectionto"&
7、_"workbookstructureorwindows."&DBLSPACE&_"Proceedingtounprotectsheets."&AUTHORS&VERSIONConstMSGTAKETIMEAsString="AfterpressingOKbuttonthis"&_"willtakesometime."&DBLSPACE&"Amountoftime"&_"dependsonhowmanydifferentpasswords,the"&_"passwords,andyourcomputer'ssp
8、ecification."&DBLSPACE&_"Justbepatient!Makemeacoffee!"&AUTHORS&VERSIONConstMSGPWORDFOUND1AsString="YouhadaWorksheet"&_"StructureorWindowsPasswordset."&DBLSPACE&_"Thepasswordfoundwas:"&DBLSPACE&"