excel破解宏代码

上传人:简****9 文档编号:101952634 上传时间:2019-09-30 格式:DOC 页数:16 大小:43KB
返回 下载 相关 举报
excel破解宏代码_第1页
第1页 / 共16页
excel破解宏代码_第2页
第2页 / 共16页
excel破解宏代码_第3页
第3页 / 共16页
excel破解宏代码_第4页
第4页 / 共16页
excel破解宏代码_第5页
第5页 / 共16页
点击查看更多>>
资源描述

《excel破解宏代码》由会员分享,可在线阅读,更多相关《excel破解宏代码(16页珍藏版)》请在金锄头文库上搜索。

1、Excel破解宏代码 Excel工作表保护密码破解方法: 1打开文件 2工具-宏-录制新宏-输入名字如:aa 3停止录制(这样得到一个空宏)4工具-宏-宏,选aa,点编辑按钮 5删除窗口中的所有字符(只有几个),替换为下面的内容:(复制吧) 6关闭编辑窗口7工具-宏-宏,选AllInternalPasswords,运行,确定两次,等2分钟,再确定.OK,密码完全被你看见了!内容如下: Public Sub AllInternalPasswords() Breaks worksheet andworkbook structure passwords. Bob McCormick probably

2、 originator of basecode algorithm modified for coverage of workbook structure / windowspasswords and for multiple passwords Norman Harker and JE McGimpsey27-Dec-2002 (Version 1.1) Modified 2003-Apr-04 by JEM: All msgs toconstants, and eliminate one Exit Sub (Version 1.1.1) Reveals hashedpasswords NO

3、T original passwords Const DBLSPACE As String = vbNewLine &vbNewLine Const AUTHORS As String = DBLSPACE & vbNewLine & _Adapted from Bob McCormick base code by & _ Norman Harker and JEMcGimpsey Const HEADER As String = AllInternalPasswords User MessageConst VERSION As String = DBLSPAC

4、E & Version 1.1.1 2003-Apr-04Const REPBACK As String = DBLSPACE & Please report failure & _to the microsoft.public.excel.programming newsgroup. Const ALLCLEAR AsString = DBLSPACE & The workbook should & _ now be free of allpassword protection, so make sure you: & _ DBLSPACE &

5、amp; SAVE ITNOW! & DBLSPACE & and also & _ DBLSPACE & BACKUP!,BACKUP!, BACKUP! & _ DBLSPACE & Also, remember that thepassword was & _ put there for a reason. Dont stuff up crucialformulas & _ or data. & DBLSPACE & Access and use of somedata & _ may be an o

6、ffense. If in doubt, dont. ConstMSGNOPWORDS1 As String = There were no passwords on & _ sheets, orworkbook structure or windows. & AUTHORS & VERSION ConstMSGNOPWORDS2 As String = There was no protection to & _ workbookstructure or windows. & DBLSPACE & _ Proceeding to unprote

7、ctsheets. & AUTHORS & VERSION Const MSGTAKETIME As String = Afterpressing OK button this & _ will take some time. & DBLSPACE& Amount of time & _ depends on how many different passwords,the & _ passwords, and your computers specification. & DBLSPACE& _ Just be pati

8、ent! Make me a coffee! & AUTHORS & VERSIONConst MSGPWORDFOUND1 As String = You had a Worksheet & _Structure or Windows Password set. & DBLSPACE & _ Thepassword found was: & DBLSPACE & $ & DBLSPACE & _ Noteit down for potential future use in other workbooks by &

9、; _ the sameperson who set this password. & DBLSPACE & _ Now to check andclear other passwords. & AUTHORS & VERSION Const MSGPWORDFOUND2 AsString = You had a Worksheet & _ password set. & DBLSPACE &The password found was: & _ DBLSPACE & $ & DBLSPACE &Note

10、it down for potential & _ future use in other workbooks by sameperson who & _ set this password. & DBLSPACE & Now to checkand clear & _ other passwords. & AUTHORS & VERSION ConstMSGONLYONE As String = Only structure / windows & _ protected withthe password that was ju

11、st found. & _ ALLCLEAR & AUTHORS &VERSION & REPBACK Dim w1 As Worksheet, w2 As Worksheet Dim i AsInteger, j As Integer, k As Integer, l As Integer Dim m As Integer, n AsInteger, i1 As Integer, i2 As Integer Dim i3 As Integer, i4 As Integer, i5As Integer, i6 As Integer Dim PWord1 As S

12、tring Dim ShTag As Boolean,WinTag As BooleanApplication.ScreenUpdating = False With ActiveWorkbook WinTag =.ProtectStructure Or .ProtectWindows End With ShTag = False For Eachw1 In Worksheets ShTag = ShTag Or w1.ProtectContents Next w1 If NotShTag And Not WinTag Then MsgBox MSGNOPWORDS1, vbInformati

13、on, HEADERExit Sub End If MsgBox MSGTAKETIME, vbInformation, HEADER If NotWinTag Then MsgBox MSGNOPWORDS2, vbInformation, HEADER Else On ErrorResume 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 i

14、3 = 65 To 66: For i4 = 65 To 66 For i5 = 65 To 66: For 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 ThenPWord1 = 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(MSGPWORDFOUND1, _$, PWord1), vbInformation, HEADER Exit Do Bypas

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 商业/管理/HR > 管理学资料

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号