您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 资本运营 > Excel-2016撤销工作表保护密码破解
Excel2016撤销工作表保护密码破解文件-选项-信任中心-信任中心设置-宏设置-启用所有宏视图-宏-录制宏-停止录制-查看宏-选择刚刚保存的宏,编辑模块1例如:Sub宏1()''宏1宏''EndSub删除所有内容复制粘贴下面所有内容到模块1返回excel,查看宏-选择“工作表保护密码破解”,执行密码破解大概需要2-3分钟PublicSub工作表保护密码破解()ConstDBLSPACEAsString=vbNewLine&vbNewLineConstAUTHORSAsString=DBLSPACE&vbNewLine&_作者:McCormickJEMcGimpseyConstHEADERAsString=工作表保护密码破解ConstVERSIONAsString=DBLSPACE&版本Version1.1.1ConstREPBACKAsString=DBLSPACE&ConstZHENGLIAsString=DBLSPACE&hfhzi3—戊冥整理ConstALLCLEARAsString=DBLSPACE&该工作簿中的工作表密码保护已全部解除!!&DBLSPACE&请记得另保存_&DBLSPACE&注意:不要用在不当地方,要尊重他人的劳动成果!ConstMSGNOPWORDS1AsString=该文件工作表中没有加密ConstMSGNOPWORDS2AsString=该文件工作表中没有加密2ConstMSGTAKETIMEAsString=解密需花费一定时间,请耐心等候!&DBLSPACE&按确定开始破解!ConstMSGPWORDFOUND1AsString=密码重新组合为:&DBLSPACE&$$&DBLSPACE&_如果该文件工作表有不同密码,将搜索下一组密码并修改清除ConstMSGPWORDFOUND2AsString=密码重新组合为:&DBLSPACE&$$&DBLSPACE&_如果该文件工作表有不同密码,将搜索下一组密码并解除ConstMSGONLYONEAsString=确保为唯一的?Dimw1AsWorksheet,w2AsWorksheetDimiAsInteger,jAsInteger,kAsInteger,lAsIntegerDimmAsInteger,nAsInteger,i1AsInteger,i2AsIntegerDimi3AsInteger,i4AsInteger,i5AsInteger,i6AsIntegerDimPWord1AsStringDimShTagAsBoolean,WinTagAsBooleanApplication.ScreenUpdating=FalseWithActiveWorkbookWinTag=.ProtectStructureOr.ProtectWindowsEndWithShTag=FalseForEachw1InWorksheetsShTag=ShTagOrw1.ProtectContentsNextw1IfNotShTagAndNotWinTagThenMsgBoxMSGNOPWORDS1,vbInformation,HEADERExitSubEndIfMsgBoxMSGTAKETIME,vbInformation,HEADERIfNotWinTagThenElseOnErrorResumeNextDo'dummydoloopFori=65To66:Forj=65To66:Fork=65To66Forl=65To66:Form=65To66:Fori1=65To66Fori2=65To66:Fori3=65To66:Fori4=65To66Fori5=65To66:Fori6=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)MsgBoxApplication.Substitute(MSGPWORDFOUND1,_$$,PWord1),vbInformation,HEADERExitDo'Bypassallfor...nextsEndIfEndWithNext:Next:Next:Next:Next:NextNext:Next:Next:Next:Next:NextLoopUntilTrueOnErrorGoTo0EndIfIfWinTagAndNotShTagThenMsgBoxMSGONLYONE,vbInformation,HEADERExitSubEndIfOnErrorResumeNextForEachw1InWorksheets'AttemptclearancewithPWord1w1.UnprotectPWord1Nextw1OnErrorGoTo0ShTag=FalseForEachw1InWorksheets'ChecksforallclearShTagtriggeredto1ifnot.ShTag=ShTagOrw1.ProtectContentsNextw1IfShTagThenForEachw1InWorksheetsWithw1If.ProtectContentsThenOnErrorResumeNextDo'DummydoloopFori=65To66:Forj=65To66:Fork=65To66Forl=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,HEADER'leveragefindingPwordbytryingonothersheetsForEachw2InWorksheetsw2.UnprotectPWord1Nextw2ExitDo'Bypassallfor...nextsEndIfNext:Next:Next:Next:Next:NextNext:Next:Next:Next:Next:NextLoopUntilTrueOnErrorGoTo0EndIfEndWithNextw1EndIfMsgBoxALLCLEAR&AUTHORS&VERSION&REPBACK&ZHENGLI,vbInformation,HEADEREndSub
本文标题:Excel-2016撤销工作表保护密码破解
链接地址:https://www.777doc.com/doc-4434965 .html