下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、excel2007怎么使用代码破解密码 excel密码破解代码在Excel中录入过多的重要数据是人们的习惯,因此这些文件都需要利用密码进行保护。但是忘记密码了怎么办呢,接下来让小编为你带来excel表设置密码忘记如何打开的解决方法,欢迎大家来到学习。excel2007表格设密码忘记的打开方法1. 打开需要破解密码的Excel2. 按Alt+F11进入VBA编辑界面3. 插入 - 模块4. 在右边Module的空白编辑区域,复制粘贴下面所有内容5. F5,运行该VBA命令-Option ExplicitPublic Sub AllInternalPasswords Breaks workshee
2、t 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 Modified 2003-Apr-04 by JEM: All msgs to constants, and eliminate one Exi
3、t Sub Reveals hashed 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 McGimpsey”Const HEADER As String = “AllInternalPasswords User Mess
4、age”Const VERSION As String = DBLSPACE & “Version 2003-Apr-04”Const REPBACK As String = DBLSPACE & “Please report failure “ & _”to the newsgroup.”Const ALLCLEAR As String = DBLSPACE & “The workbook should “ & _”now be free of all password protection, so make sure you:” & _DBL
5、SPACE & “SAVE IT NOW!” & DBLSPACE & “and also” & _DBLSPACE & “BACKUP!, BACKUP!, BACKUP!” & _DBLSPACE & “Also, remember that the password was “ & _”put there for a reason. Dont stuff up crucial formulas “ & _”or data.” & DBLSPACE & “Access and use of some d
6、ata “ & _”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 no protection to “ & _”workbook structure or windows.” & DB
7、LSPACE & _”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 computers
8、specification.” & DBLSPACE & _”Just be patient! Make me a coffee!” & AUTHORS & VERSIONConst MSGPWORDFOUND1 As String = “You had a Worksheet “ & _”Structure or Windows Password set.” & DBLSPACE & _”The password found was: “ & DBLSPACE & “$” & DBLSPACE & _”N
9、ote 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 & VERSIONConst MSGPWORDFOUND2 As String = “You had a Worksheet “ & _”password set.” & DBLSPACE &
10、“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 & VERSIONConst MSG
11、ONLYONE As String = “Only structure / windows “ & _”protected with the password that was just found.” & _ALLCLEAR & AUTHORS & VERSION & REPBACKDim w1 As Worksheet, w2 As WorksheetDim i As Integer, j As Integer, k As Integer, l As IntegerDim m As Integer, n As Integer, i1 As Integ
12、er, i2 As IntegerDim i3 As Integer, i4 As Integer, i5 As Integer, i6 As IntegerDim PWord1 As StringDim ShTag As Boolean, WinTag As Boolean = FalseWith ActiveWorkbookWinTag = .ProtectStructure Or .ProtectWindowsEnd WithShTag = FalseFor Each w1 In WorksheetsShTag = ShTag Or Next w1If Not ShTag And Not
13、 WinTag ThenMsgBox MSGNOPWORDS1, vbInformation, HEADERExit SubEnd IfMsgBox MSGTAKETIME, vbInformation, HEADERIf Not WinTag ThenMsgBox MSGNOPWORDS2, vbInformation, HEADERElseOn Error Resume NextDo dummy do loopFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For l = 65 To 66: For m = 65 To 66: For
14、 i1 = 65 To 66For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126With ActiveWorkbook.Unprotect Chr & Chr & Chr & _Chr & Chr & Chr & Chr & _Chr & Chr & Chr & Chr & ChrIf .ProtectStructure = False An
15、d _.ProtectWindows = False ThenPWord1 = Chr & Chr & Chr & Chr & _Chr & Chr & Chr & Chr & _Chr & Chr & Chr & ChrMsgBox , vbInformation, HEADERExit Do Bypass all for.nextsEnd IfEnd WithNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop
16、Until TrueOn Error GoTo 0End IfIf WinTag And Not ShTag ThenMsgBox MSGONLYONE, vbInformation, HEADERExit SubEnd IfOn Error Resume NextFor Each w1 In WorksheetsAttempt clearance with PWord1 PWord1Next w1On Error GoTo 0ShTag = FalseFor Each w1 In WorksheetsChecks for all clear ShTag triggered to 1 if n
17、ot.ShTag = ShTag Or Next w1If ShTag ThenFor Each w1 In WorksheetsWith w1If .ProtectContents ThenOn Error Resume NextDo Dummy do loopFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66For i5 =
18、 65 To 66: For i6 = 65 To 66: For n = 32 To 126.Unprotect Chr & Chr & Chr & _Chr & Chr & Chr & Chr & Chr & _Chr & Chr & Chr & ChrIf Not .ProtectContents ThenPWord1 = Chr & Chr & Chr & Chr & _Chr & Chr & Chr & Chr & _Chr & Chr & Chr & ChrMsgBox , vbInformation, HEADERleverage finding Pword by trying on other sheetsFor Each w2 In Worksheets PWord1Next w2Exit Do Bypass all for.nextsEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Erro
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 租房合同协议书格式英文版英文版示例
- 文化墙建设招标文件范例
- 木制品原材料购销合同
- 塑料袋购销合同条款
- 特许加盟授权协议
- 交通道路工程设计勘察招标说明会
- 抹灰工程劳务合作
- 无房产证房屋交易合同
- 房屋居间合同买卖模板
- 家具购销合同样式设计
- 新修订中华人民共和国行政许可法全文解读学习
- 法院特别委托书授权模板
- 探寻中国茶:一片树叶的传奇之旅学习通超星期末考试答案章节答案2024年
- GB/T 44264-2024光伏组件清洁机器人通用技术条件
- 电力系统自动化课程设计
- 2023年半导体封装工程师年终总结及下一年展望
- 23秋国家开放大学《EXCEL在财务中的应用》形考作业1-4参考答案
- 唯一住房补贴申请书(共2页)
- 中医养生脾胃为先PPT文档
- 门窗工程成品保护方案(附图)
- 八年级国学经典诵读二十首诗词
评论
0/150
提交评论