破解excel加密 宏命令

合集下载

ex-vba迄今为止最简单的excel工作表密码解除方法

ex-vba迄今为止最简单的excel工作表密码解除方法

ex-vba迄今为止最简单的excel工作表密码解除方法
『动画解读』
对于设置了工作表密码的工作簿,打开后,具体操作步骤如下:
Step-01:通过菜单【开发工具】-【Visual Basic】进入VBA 编辑界面
Step-02:在VBA编辑窗口的【立即窗口】中逐步执行以下代码(输完一句回车后再输入另一句并回车其中sheet1为需要破解密码的工作表的名称)sheet1.Protect AllowFiltering:=truesheet1.unProtect
逐步执行这两行代码后,工作表的密码将被解除!!!
如果打开VBA编辑窗口时没有立即窗口,可以通过菜单【视图】-【立即窗口】调出来,如下图所示:
『扩展应用』如果需要批量解除的,可以自行加入循环控制语句,写成一个过程。

代码参考如下(将代码复制放在ThisWorkbook下,然后运行):Sub clsWkShtPwd() Dim sht As Worksheet For Each sht In Worksheets
sht.Protect AllowFiltering:=True sht.unprotect NextEnd Sub
在此再次感谢大神们的分享!同时,一门技术是好是坏,全凭个人掌握,用于益处是为好……。

如何利用VBA实现Excel数据加密与解密

如何利用VBA实现Excel数据加密与解密

如何利用VBA实现Excel数据加密与解密在Excel中,数据加密与解密是非常重要的功能,可以保护敏感数据的安全性。

VBA(Visual Basic for Applications)是一种编程语言,可以在Excel中编写宏来实现各种功能。

利用VBA编写代码可以实现Excel数据的加密与解密操作,本文将介绍如何利用VBA实现Excel数据的加密与解密。

首先,我们需要创建一个新的Excel工作簿,并通过VBA 编辑器添加一个新的模块。

在模块中编写以下代码:```VBAPrivate Sub EncryptData(ByVal rng As Range, ByVal password As String)rng.Formula = "=ENCRYPT.DECRYPT(" & rng.Address & "," & """" & password & """" & ",TRUE)"End SubPrivate Sub DecryptData(ByVal rng As Range, ByVal password As String)rng.Formula = "=ENCRYPT.DECRYPT(" & rng.Address & "," & """" & password & """" & ",FALSE)"End Sub```上述代码中,`EncryptData`是加密数据的函数,接受两个参数:`rng`是要加密的数据范围,`password`是加密密码。

破解excel保护密码破解vbaproject密码

破解excel保护密码破解vbaproject密码

破解excel保护密码破解vbaproject密码破解excel保护密码破解vbaproject密码破解excel保护密码破解vbaproject密码破解vbaproject密码1.打开带密码的Excel,视图---宏----录制宏---(保存到)“个人宏工作簿”---点“确认”。

2.查看宏----点“编辑”-----进入“Microsofe visual basic-PERSONAL.XLSB”页面;3.点“模块1“,弹出“模块1代码”----清除“模块1代码”里面的东西-----复制如下东西:Public Sub 工作表保护密码破解() Const DBLSPACE As String = vbNewLine & vbNewLineConst AUTHORS As String = DBLSPACE & vbNewLine & _"作者:McCormick JE McGimpsey "Const HEADER As String = "工作表保护密码破解"Const VERSION As String = DBLSPACE & "版本Version 1.1.1"Const REPBACK As String = DBLSPACE & ""Const ZHENGLI As String = DBLSPACE & " hfhzi3—戊冥整理"Const ALLCLEAR As String = DBLSPACE & "该工作簿中的工作表密码保护已全部解除!!" & DBLSPACE & "请记得另保存" _ & DBLSPACE & "注意:不要用在不当地方,要尊重他人的劳动成果!"Const MSGNOPWORDS1 As String = "该文件工作表中没有加密"Const MSGNOPWORDS2 As String = "该文件工作表中没有加密2"Const MSGTAKETIME As String = "解密需花费一定时间,请耐心等候!" & DBLSPACE & "按确定开始破解!"Const MSGPWORDFOUND1 As String = "密码重新组合为:" & DBLSPACE & "$$" & DBLSPACE & _"如果该文件工作表有不同密码,将搜索下一组密码并修改清除"Const MSGPWORDFOUND2 As String = "密码重新组合为:" & DBLSPACE & "$$" & DBLSPACE & _"如果该文件工作表有不同密码,将搜索下一组密码并解除"Const MSGONLYONE As String = "确保为唯一的?"Dim 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 Integer, i2 As IntegerDim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer Dim PWord1 As StringDim ShTag As Boolean, WinTag As BooleanApplication.ScreenUpdating = FalseWith ActiveWorkbookWinTag = .ProtectStructure Or .ProtectWindowsEnd WithShTag = FalseFor Each w1 In WorksheetsShTag = ShTag Or w1.ProtectContentsNext w1If Not ShTag And Not WinTag ThenMsgBox MSGNOPWORDS1, vbInformation, HEADER Exit Sub End IfMsgBox MSGTAKETIME, vbInformation, HEADERIf Not WinTag ThenElseOn Error Resume NextDo 'dummy do loopFor 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 T o 66: For i3 = 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, HEADERExit Do 'Bypass all for...nextsEnd IfEnd WithNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfIf WinTag And Not ShTag ThenMsgBox MSGONLYONE, vbInformation, HEADERExit SubEnd IfOn Error Resume NextFor Each w1 In Worksheets'Attempt clearance with PWord1w1.Unprotect PWord1Next w1On Error GoTo 0ShTag = FalseFor Each w1 In Worksheets'Checks for all clear ShTag triggered to 1 if not. ShTag = ShTag Or w1.ProtectContentsNext 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 66 For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 .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 Not .ProtectContents 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(MSGPWORDFOUND2, _ "$$", PWord1), vbInformation, HEADER'leverage finding Pword by trying on other sheetsFor Each w2 In Worksheetsw2.Unprotect PWord1Next w2Exit Do 'Bypass all for...nextsEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfEnd WithNext w1End IfMsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK & ZHENGLI, vbInformation, HEADEREnd Sub4.点保存,然后关闭“BOOK1”5.点运行,就OK了。

excel宏解除工作表密码

excel宏解除工作表密码

1\打开文件2\工具—-—宏—-——录制新宏——-输入名字如:aa 3\停止录制(这样得到一个空宏) 4\工具———宏----宏,选aa,点编辑按钮5\删除窗口中的所有字符(只有几个),替换为下面的内容:(你复制吧)Option ExplicitPublic Sub AllInternalPasswords() ’Breaks worksheet 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 (Version 1.1)’Modified 2003—Apr-04 by JEM: All msgs to constants, and ’eliminate one Exit Sub (Version 1.1。

1) ’Reveals hashed passwords NOT original passwords Const DBLSPACE As String = vbNewLine & vbNewLine Const AUTHORS As String = DBLSPACE &vbNewLine & _ "Adapted from Bob McCormick base code by" &_ "Norman Harker and JE McGimpsey" Const HEADER As String = ”AllInternalPasswords User Message" Const VERSION As String = DBLSPACE & "Version 1。

使用宏命令撤销EXCEL工作表保护

使用宏命令撤销EXCEL工作表保护

使用宏命令撤销EXCEL工作表保护最近要用到一个以前我设置了保护的EXCEL文件,结果想消除保护的时候发现自己忘记了密码,十分郁闷,无奈,上网google之,得一下方法:EXCEL工作表编辑资料,设置了工作表保护后,不能对表格进行插入删除操作。

如果没有密码,很简单:工具-选项—工作表保护——撤消工作表保护就可以了。

如果忘记密码,如下操作:1. 打开文件2. 工具---宏----录制新宏---输入名字如:a3. 停止录制(这样得到一个空宏)4. 工具---宏----宏,选a,点编辑按钮5. 删除窗口中的所有字符(只有几个),替换为下面的内容:(复制下来)Option ExplicitPublic Sub AllInternalPasswords()' Breaks worksheet 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 (Version 1.1)' Modified 2003-Apr-04 by JEM: All msgs to constants, and' eliminate one Exit Sub (Version 1.1.1)' 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 Message"Const VERSION As String = DBLSPACE & "Version 1.1.1 2003-Apr-04"Const REPBACK As String = DBLSPACE & "Please report failure " & _"to the microsoft.public.excel.programming newsgroup."Const ALLCLEAR As String = DBLSPACE & "The workbook should " & _"now be free of all password protection, so make sure you:" & _DBLSPACE & "SA VE IT NOW!" & DBLSPACE & "and also" & _DBLSPACE & "BACKUP!, BACKUP!!, BACKUP" & _DBLSPACE & "Also, remember that the password was " & _"put there for a reason. Don't stuff up crucial formulas " & _"or data." & DBLSPACE & "Access and use of some data " & _"may be an offense. If in doubt, don't."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." & DBLSPACE & _"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 computer's specification." & DBLSPACE & _"Just be patient! Make me a coffee!" & AUTHORS & VERSION Const MSGPWORDFOUND1 As String = "You had a Worksheet " & _ "Structure or Windows Password set." & DBLSPACE & _"The password found was: " & DBLSPACE & "$$" & DBLSPACE & _ "Note 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 & VERSION Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _ "password set." & DBLSPACE & "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 MSGONL YONE 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 Integer, i2 As IntegerDim i3 As Integer, i4 As Integer, i5 As Integer, i6 As IntegerDim PWord1 As StringDim ShTag As Boolean, WinTag As BooleanApplication.ScreenUpdating = FalseWith ActiveWorkbookWinTag = .ProtectStructure Or .ProtectWindowsEnd WithShTag = FalseFor Each w1 In WorksheetsShTag = ShTag Or w1.ProtectContentsNext w1If Not ShTag And Not 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 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(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, HEADERExit Do 'Bypass all for...nextsEnd IfEnd WithNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfIf WinTag And Not ShTag ThenMsgBox MSGONL YONE, vbInformation, HEADERExit SubEnd IfOn Error Resume NextFor Each w1 In Worksheets'Attempt clearance with PWord1w1.Unprotect PWord1Next w1On Error GoTo 0ShTag = FalseFor Each w1 In Worksheets'Checks for all clear ShTag triggered to 1 if not.ShTag = ShTag Or w1.ProtectContentsNext 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 66 For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126.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 Not .ProtectContents 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(MSGPWORDFOUND2, _"$$", PWord1), vbInformation, HEADER'leverage finding Pword by trying on other sheetsFor Each w2 In Worksheetsw2.Unprotect PWord1Next w2Exit Do 'Bypass all for...nextsEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfEnd WithNext w1End IfMsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER End Sub6. 关闭编辑窗口7. 工具---宏-----宏,选AllInternalPasswords,运行,确定两次,等2分钟(确实有这么长时间),再确定.OK。

解除excel中的宏密码

解除excel中的宏密码

解除excel中的宏密码
解除excel中的宏密码
第一步:将文件另存为2003版本的格式(.xls)
第二步:用普通的文本编辑器打开2003版本的文件,文件类型为所有文件,我用的是Notepad++
第三步:然后在文件里查找“DPB”修改为“DPx”,注意大小写
第四步:保存后重新打开文件,会遇到一些错误,忽略
第五步:打开Visual Basic的时候也会遇到一些错误,继续忽略
第六步:从VBA编辑器的“工具”菜单,选择VBAProject属性(E),“保护”面板,输入新的密码,保存并关闭excel
第七步:重新启动excel打开该文件,进入开发工具Visual Basic,输入刚才设置的密码,就可以看到加密的代码了
第八步:回到VBA编辑器的“保护”面板,去掉密码和锁定,保存文件,加密去除成功。

Excel设置和取消宏保护密码代码

Excel设置和取消宏保护密码代码
End If
MsgBox "文件解密成功......", 32, "提示"
Else
Dim MMs As String * 5
MMs = "DPB="""
Put #1, CMGs, MMs
MsgBox "对文件特殊加密成功......", 32, "提示"
End If
Close #1
'取得一个20十六制字串
Get #1, DPBo + 16, s20
'替换加密部份机码
For i = CMGs To DPBo Step 2
Put #1, i, St
Next
'加入不配对符号
If (DPBo - CMGs) Mod 2 <> 0 Then
Put #1, DPBo + 1, s20
Exit Sub
Else
VBAPassword FileName, False
End If
End Sub
'设置VBA编码保护
Sub SetProtect()
Dim FileName As String
FileName = Application.GetOpenFilename("Excel文件(*.xls *.xla,*.xls;*.xla", , "VBA破解")
If FileName = CStr(False) Then
Exit Sub
Else
VBAPassword FileName, True

用宏代码破解工作表保护密码

用宏代码破解工作表保护密码

用宏代码破解密码:以office2007为例说明,(2003也是一样的,只是菜单命令的位置不同)第一步:打开该文件,先解除默认的“宏禁用”状态,方法是点击工具栏下的“选项”状态按钮,打开“Microsoft Office安全选项”窗口,选择其中的“启用此内容”,“确定”退出;再切换到“视图”选项卡,点击“宏”→“录制宏”,出现“录制新宏”窗口,在“宏名”定义一个名称为:PassWordBreaker,点击“确定”退出;第二步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“编辑”,打开“Microsoft Visual Basic”编辑器,用如下内容替换右侧窗口中的所有代码:Sub PasswordBreaker()Dim i As Integer, j As Integer, k As IntegerDim l As Integer, m As Integer, n As IntegerDim i1 As Integer, i2 As Integer, i3 As IntegerDim i4 As Integer, i5 As Integer, i6 As IntegerOn Error Resume NextFor 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 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126ActiveSheet.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 ActiveSheet.ProtectContents = False ThenMsgBox "One usable password is " & Chr(i) & Chr(j) & _Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)ActiveWorkbook.Sheets(1).SelectRange("a1").FormulaR1C1 = Chr(i) & Chr(j) & _Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)Exit SubEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextEnd Sub第三步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“执行”,密码就现形了。

解除EXCEL的单元格保护密码秘籍100%成功

解除EXCEL的单元格保护密码秘籍100%成功

如何破解EXCEL的单元格保护密码VBA宏代码破解法:第一步:打开该文件,先解除默认的“宏禁用”状态,方法是点击工具栏下的“选项”状态按钮,打开“MicrosoftOffice安全选项”窗口,选择其中的“启用此内容”,“确定”退出;再切换到“视图”选项卡,点击“宏”→“录制宏”,出现“录制新宏”窗口,在“宏名”定义一个名称为:PasswordBreaker,点击“确定”退出;第二步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“编辑”,打开“Microsoft Visual Basic”编辑器,用如下内容替换右侧窗口中的所有代码:Sub PasswordBreaker()Dim i As Integer, j As Integer, k As IntegerDim l As Integer, m As Integer, n As IntegerDim i1 As Integer, i2 As Integer, i3 As IntegerDim i4 As Integer, i5 As Integer, i6 As IntegerOn Error Resume NextFor 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 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126ActiveSheet.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 ActiveSheet.ProtectContents = False ThenMsgBox "One usable password is " & Chr(i) & Chr(j) & _Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)ActiveWorkbook.Sheets(1).SelectRange("a1").FormulaR1C1 = Chr(i) & Chr(j) & _Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)Exit SubEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextEnd Sub第三步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“执行”,密码就现形了。

excel被保护解锁宏代码

excel被保护解锁宏代码

excel被保护解锁宏代码1\打开文件2\工具---宏----录制新宏---输入名字如:aa3\停止录制(这样得到一个空宏)4\工具---宏----宏,选aa,点编辑按钮5\删除窗口中的所有字符(只有几个),替换为下面的内容:(你复制吧)Option ExplicitPublic Sub AllInternalPasswords()' Breaks worksheet 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 (Version 1.1)' Modified 2003-Apr-04 by JEM: All msgs to constants, and' eliminate one Exit Sub (Version 1.1.1)' 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 Message"Const VERSION As String = DBLSPACE & "Version 1.1.1 2003-Apr-04" Const REPBACK As String = DBLSPACE & "Please report failure " & _"to the microsoft.public.excel.programming newsgroup."Const ALLCLEAR As String = DBLSPACE & "The workbook should " & _ "now be free of all password protection, so make sure you:" & _ DBLSPACE & "SAVE IT NOW!" & DBLSPACE & "and also" & _DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _DBLSPACE & "Also, remember that the password was " & _"put there for a reason. Don't stuff up crucial formulas " & _"or data." & DBLSPACE & "Access and use of some data " & _"may be an offense. If in doubt, don't."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." & DBLSPACE & _"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 computer's 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 & _"Note 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 & VERSION Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _ "password set." & DBLSPACE & "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 MSGONLYONE 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 Integer, i2 As IntegerDim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer Dim PWord1 As StringDim ShTag As Boolean, WinTag As BooleanApplication.ScreenUpdating = FalseWith ActiveWorkbookWinTag = .ProtectStructure Or .ProtectWindowsEnd WithShTag = FalseFor Each w1 In WorksheetsShTag = ShTag Or w1.ProtectContentsNext w1If Not ShTag And Not 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 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(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, HEADERExit Do 'Bypass all for...nextsEnd IfEnd WithNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfIf WinTag And Not ShTag ThenMsgBox MSGONLYONE, vbInformation, HEADERExit SubEnd IfOn Error Resume NextFor Each w1 In Worksheets'Attempt clearance with PWord1w1.Unprotect PWord1Next w1On Error GoTo 0ShTag = FalseFor Each w1 In Worksheets'Checks for all clear ShTag triggered to 1 if not. ShTag = ShTag Or w1.ProtectContentsNext 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 66 For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66 For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 .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 Not .ProtectContents 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(MSGPWORDFOUND2, _"$$", PWord1), vbInformation, HEADER'leverage finding Pword by trying on other sheetsFor Each w2 In Worksheetsw2.Unprotect PWord1Next w2Exit Do 'Bypass all for...nextsEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfEnd WithNext w1End IfMsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADEREnd Sub6\关闭编辑窗口7\工具---宏-----宏,选AllInternalPasswords,运行,确定两次,等2分钟,再确定.OK,没有密码了欢迎您的下载,资料仅供参考!致力为企业和个人提供合同协议,策划案计划书,学习资料等等打造全网一站式需求。

EXCEL宏密码破解方法

EXCEL宏密码破解方法

一、Excel“工程不可查看”两种实现方法及破解关于Excel宏编程中,要用到一些技巧,如破解Excel宏加密;二、今天我对一个Excel宏编程中进行日期限制进行了破解;三、方法一共用级锁定四、1、先对excel档进行一般的vbaproject”工程密码保护;五、2、打开要保护的档,选择∶工具--->保护--->保护并共用活页簿--->以追踪修订方式共用-->输入密码-->保存档; 完成後,当你打开“vbaproject”工程属性时,就将会提示∶“工程不可看”六、方法二推荐,破坏型锁定七、用16进制编辑工具,如winhex、ultraedit-32可到此下载等,再历害点的人完全可以用debug命令来做......用以上软体打开excel档,查找定位以下地方∶八、id="{00000000-0000-0000-00000}" 注∶实际显示不会全部为0九、此时,你只要将其中的位元组随便修改一下即可;保存再打开,就会发现大功告成十、当然,在修改前最好做好你的文档备份;至於恢复只要将改动过的地方还原即可只要你记住了呵呵;十一、破解方面,有网友说将CMG=,DPB=和GC=后的"="替换为"."也可以的,我已测试过的确可以,这样更省事点;用16进制编辑工具,如winhex、ultraedit-32打开文件,查找ID=......, 或到文件尾查看,找到即可;改其中的任意一位,存盘就可达到目的,注意:留有备份文件十二、十三、二、EXCEL宏保护密码破解-VBA工程密码破解十四、在办公中我们常看到许多用宏VBA编写的EXCEL表格,而这些表格就如同一个数据库,我们可以选取或查询很多的数据,一般的这些数据是存放在一个隐藏的工作表中的,那么要如何显示这个隐藏的工作表呢我们可以打开宏编辑器ALT+F11,再安CTRL+R打开专案,这时弹出窗会有所有的这个EXCEL的工用表,这时你就可以看看那些是被隐藏的了,很多时候打开是需要密码的,用以下方法解密后,再将解密后文件打开,依同样方法在工作表标签中右键>>检视程式码>>复制以下代码>>按F8执行十五、Private Sub CommandButton1_Click十六、Worksheets"这里为你要显示的工作表名称".Visible = True十七、End Sub十八、关于破解EXCEL VBA工程密码的方法,以下代码非常有效,首先建一新EXCEL文件,在工作表标签处右点>>检视程式码>>复制以下代码>>按F8执行在弹出窗中选你要你破解工程密码的EXCEL文件 >>再按F5执行即可.十九、Private Sub VBAPassword二十、'你要解保护的Excel文件路径二十一、Filename = "Excel文件.xls & .xla & .xlt,.xls;.xla;.xlt", , "VBA破解"二十二、If DirFilename = "" Then二十三、MsgBox "没找到相关文件,清重新设置;"二十四、Exit Sub二十五、Else二十六、FileCopy Filename, Filename & ".bak" '备份文件;二十七、End If二十八、Dim GetData As String 5二十九、Open Filename For Binary As 1三十、Dim CMGs As Long三十一、Dim DPBo As Long三十二、For i = 1 To LOF1三十四、If GetData = "CMG=""" Then CMGs = i三十五、If GetData = "Host" Then DPBo = i - 2: Exit For三十六、Next三十七、If CMGs = 0 Then三十八、MsgBox "请先对VBA编码设置一个保护密码...", 32, "提示"三十九、Exit Sub四十、End If四十一、If Protect = False Then四十二、Dim St As String 2四十三、Dim s20 As String 1四十四、'取得一个0D0A十六进制字串四十五、Get 1, CMGs - 2, St四十六、'取得一个20十六制字串四十七、Get 1, DPBo + 16, s20四十八、'替换加密部份机码四十九、For i = CMGs To DPBo Step 2五十、Put 1, i, St五十一、Next五十二、'加入不配对符号五十三、If DPBo - CMGs Mod 2 <> 0 Then五十四、Put 1, DPBo + 1, s20五十五、End If五十六、MsgBox "文件解密成功......", 32, "提示"五十七、End If五十八、Close 1五十九、End Sub六十、六十一、如果上面代码不能运行或出错,请用以下代码重试.六十二、六十三、Private Sub VBAPassword六十四、'你要解保护的Excel文件路径六十五、Filename = "Excel文件.xls & .xla & .xlt,.xls;.xla;.xlt", , "VBA破解" 六十六、If DirFilename = "" Then六十七、MsgBox "没找到相关文件,清重新设置;"六十八、Exit Sub六十九、Else七十、FileCopy Filename, Filename & ".bak" '备份文件;七十一、End If七十二、Dim GetData As String 5七十三、Open Filename For Binary As 1七十四、Dim CMGs As Long七十五、Dim DPBo As Long七十六、For i = 1 To LOF1七十八、If GetData = "CMG=""" Then CMGs = i七十九、If GetData = "Host" Then DPBo = i - 2: Exit For八十、Next八十一、If CMGs = 0 Then八十二、MsgBox "请先对VBA编码设置一个保护密码...", 32, "提示"八十三、Exit Sub八十四、End If八十五、八十六、Dim St As String 2八十七、Dim s20 As String 1八十八、'取得一个0D0A十六进制字串八十九、Get 1, CMGs - 2, St九十、'取得一个20十六制字串九十一、Get 1, DPBo + 16, s20九十二、'替换加密部份机码九十三、For i = CMGs To DPBo Step 2九十四、Put 1, i, St九十五、Next九十六、'加入不配对符号九十七、If DPBo - CMGs Mod 2 <> 0 Then九十八、Put 1, DPBo + 1, s20九十九、End If百、MsgBox "文件解密成功......", 32, "提示"百一、Close 1百二、End Sub第二步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“编辑”,打开“Microsoft Visual Basic”编辑器,用如下内容替换右侧窗口中的所有代码:Sub PasswordBreakerDim i As Integer, j As Integer, k As IntegerDim l As Integer, m As Integer, n As IntegerDim i1 As Integer, i2 As Integer, i3 As IntegerDim i4 As Integer, i5 As Integer, i6 As IntegerOn Error Resume NextFor 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 i3 = 65 To 66: For i4 = 65 To 66 For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 Chri & Chrj & Chrk & _Chrl & Chrm & Chri1 & Chri2 & Chri3 & _Chri4 & Chri5 & Chri6 & ChrnIf = False ThenMsgBox "One usable password is " & Chri & Chrj & _Chrk & Chrl & Chrm & Chri1 & Chri2 & _Chri3 & Chri4 & Chri5 & Chri6 & Chrn1.SelectRange"a1".FormulaR1C1 = Chri & Chrj & _Chrk & Chrl & Chrm & Chri1 & Chri2 & _Chri3 & Chri4 & Chri5 & Chri6 & ChrnExit SubEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextEnd Sub。

excel解密

excel解密

VBA宏代码破解法:1、第一步:打开该文件,先解除默认的“宏禁用”状态,方法是点击工具栏下的“选项”状态按钮,打开“Microsoft Office安全选项”窗口,选择其中的“启用此内容”,“确定”退出2、再切换到“视图”选项卡,点击“宏”→“录制宏”,出现“录制新宏”窗口,在“宏名”定义一个名称为:PasswordBreaker(图3),点击“确定”退出;3、第二步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“编辑”,打开“Microsoft Visual Basic”编辑器,用如下内容替换右侧窗口中的所有代码:Sub PasswordBreaker()Dim i As Integer, j As Integer, k As IntegerDim l As Integer, m As Integer, n As IntegerDim i1 As Integer, i2 As Integer, i3 As IntegerDim i4 As Integer, i5 As Integer, i6 As IntegerOn Error Resume NextFor 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 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126ActiveSheet.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 ActiveSheet.ProtectContents = False ThenMsgBox "One usable password is " & Chr(i) & Chr(j) & _Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)ActiveWorkbook.Sheets(1).SelectRange("a1").FormulaR1C1 = Chr(i) & Chr(j) & _Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)Exit SubEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextEnd Sub4、第三步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“执行”,密码就现形了(图4)。

EXCEL密码暴力破解

EXCEL密码暴力破解

EXCEL密码去除(工作表、工作薄密码保护破解)各位朋友不知有沒有碰到过这样的情况,当要打幵一个EXCEL工作表时,突然发现密碼忘记了,唯一可做的也许是搞个破解软件来破一下,但针对打幵后的工作表保护,一般就很难有效了,复制虽是一种方法,但不少数据(特別是公式较多者),可能就要乱套了,如何才能破解这一类密码呢?不久前在网上发现此精华,与大家共享一下!利用宏运行方式破解,真的很有效,运行中可能电脑会有两分钟无反应,千萬不要以为死机了哦,等等吧!步骤方法如下:1、打开文件2、工具---宏----录制新宏---输入名字如:aa3、停止录制(这样得到一个空宏)4、工具---宏----宏,选aa,点编辑按钮5、删除窗口中的所有字符(只有几个),替换为下面的内容:(复制吧)6、关闭编辑窗口7、工具---宏-----宏,选AllInternalPasswords,运行,确定两次,等2分钟,再确定.OK,没有密码了!!宏内容如下:Public Sub AllInternalPasswords()' Breaks worksheet 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 (Version 1.1)' Modified 2003-Apr-04 by JEM: All msgs to constants, and' eliminate one Exit Sub (Version 1.1.1)' 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 Message"Const VERSION As String = DBLSPACE & "Version 1.1.1 2003-Apr-04"Const REPBACK As String = DBLSPACE & "Please report failure " & _"to the microsoft.public.excel.programming newsgroup."Const ALLCLEAR As String = DBLSPACE & "The workbook should " & _"now be free of all password protection, so make sure you:" & _DBLSPACE & "SAVE IT NOW!" & DBLSPACE & "and also" & _DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _DBLSPACE & "Also, remember that the password was " & _"put there for a reason. Don't stuff up crucial formulas " & _"or data." & DBLSPACE & "Access and use of some data " & _"may be an offense. If in doubt, don't."Const MSGNOPWORDS1 As String = "There were no passwords on " & _ "sheets, or workbook structure or windows." & AUTHORS & VERSION Const MSGNOPWORDS2 As String = "There was no protection to " & _ "workbook structure or windows." & DBLSPACE & _"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 computer's 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 & _"Note 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 & VERSION Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _ "password set." & DBLSPACE & "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 MSGONLYONE 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 Integer, i2 As IntegerDim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer Dim PWord1 As StringDim ShTag As Boolean, WinTag As BooleanApplication.ScreenUpdating = FalseWith ActiveWorkbookWinTag = .ProtectStructure Or .ProtectWindowsEnd WithShTag = FalseFor Each w1 In WorksheetsShTag = ShTag Or w1.ProtectContentsNext w1If Not ShTag And Not WinTag ThenMsgBox MSGNOPWORDS1, vbInformation, HEADERExit SubMsgBox 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 66 For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66 For i2 = 65 To 66: For i3 = 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, HEADERExit Do 'Bypass all for...nextsEnd IfEnd WithNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfIf WinTag And Not ShTag ThenMsgBox MSGONLYONE, vbInformation, HEADERExit SubEnd IfOn Error Resume NextFor Each w1 In Worksheets'Attempt clearance with PWord1w1.Unprotect PWord1Next w1On Error GoTo 0ShTag = FalseFor Each w1 In Worksheets'Checks for all clear ShTag triggered to 1 if not. ShTag = ShTag Or w1.ProtectContentsIf 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 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126.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 Not .ProtectContents 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(MSGPWORDFOUND2, _"$$", PWord1), vbInformation, HEADER'leverage finding Pword by trying on other sheetsFor Each w2 In Worksheetsw2.Unprotect PWord1Next w2Exit Do 'Bypass all for...nextsEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfEnd WithNext w1End IfMsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER End Sub好了,经测试有效,祝各位成功!。

破解Excel文件密码保护的方法(VBA宏代码破解法)

破解Excel文件密码保护的方法(VBA宏代码破解法)

破解Excel文件密码保护的方法(VBA宏代码破解法)破解Excel文件密码保护的方法(VBA宏代码破解法)第一步:打开该文件,先解除默认的“宏禁用”状态,方法是点击栏下的“选项”状态按钮,打开“Microsoft Office安全选项”窗口,选择其中的“启用此内容”,“确定”退出;再切换到“视图”选项卡,点击“宏”→“录制宏”,出现“录制新宏”窗口,在“宏名”定义一个名称为:PassBreaker(图3),点击“确定”退出;第二步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“编辑”,打开“Microsoft Visual Basic”编辑器,用如下内容替换右侧窗口中的所有代码:Sub PasswordBreaker()Dim i As Integer, j As Integer, k As IntegerDim l As Integer, m As Integer, n As IntegerDim i1 As Integer, i2 As Integer, i3 As IntegerDim i4 As Integer, i5 As Integer, i6 As IntegerOn Error Resume NextFor 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 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126ActiveSheet.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 ActiveSheet.ProtectContents = False ThenMsgBox "One usable password is " & Chr(i) & Chr(j) & _Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)ActiveWorkbook.Sheets(1).SelectRange("a1").FormulaR1C1 = Chr(i) & Chr(j) & _Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)Exit SubEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextEnd Sub第三步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“执行”,密码就现形了。

如何破解excel宏密码的方法

如何破解excel宏密码的方法

如何破解excel宏密码的方法在Excel中经常需要设置密码保护重要的数据,但时间过后密码就会容易忘记,这个时候就需要破解密码了,接下来是店铺为大家带来的如何破解excel宏密码的方法,希望对你有用。

如何破解excel宏密码的方法:破解宏密码步骤1:打开需要破解的文件,并点开需要输入密码的界面,如图破解宏密码步骤2:使用EXCEL.EXE重新打开一个工作簿。

破解宏密码步骤3:打开新工作簿的VBA代码区域,并插入一个模块。

破解宏密码步骤4:插入如下代码Sub test()Dim st, nd, th3, th4, th5, th6, th7, th8 As VariantDim ii, jj, kk, ll, mm, nn, oo, pp, qq As IntegerDim PADN, PD, IJ, JK, PADNO, speedspeed = 0.005st = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")nd = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")th3 = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G","H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")th4 = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")th5 = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")th6 = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")th7 = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")th8 = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")PADN = InputBox("How long the password is", "Guilin Hu", 4) PADNO = CInt(PADN)For IJ = 1 To 100If Sheet1.Cells(IJ, 1) = "" Then Sheet1.Cells(IJ, 1) = NowExit ForElseEnd IfNext IJPauseTime = 2Start = TimerDo While Timer < Start + PauseTime DoEventsLoopFinish = TimerSelect Case (PADNO)Case 1For ii = 0 To 61PD = st(ii)SendKeys PDPauseTime = speedStart = TimerDo While Timer < Start + PauseTime DoEventsLoopFinish = TimerSendKeys "{enter}"PauseTime = speedStart = TimerDo While Timer < Start + PauseTime DoEventsLoopFinish = TimerSendKeys "{enter}"Next iiCase 2For ii = 0 To 61For jj = 0 To 61PD = st(ii) & nd(jj)SendKeys PDPauseTime = speedStart = TimerDo While Timer < Start + PauseTime DoEventsLoopFinish = TimerSendKeys "{enter}"PauseTime = speedStart = TimerDo While Timer < Start + PauseTime DoEventsLoopFinish = TimerSendKeys "{enter}"Next jjNext iiCase 3For ii = 0 To 61For jj = 0 To 61For kk = 0 To 61PD = st(ii) & nd(jj) & th3(kk) SendKeys PDPauseTime = speedStart = TimerDo While Timer < Start + PauseTime DoEventsLoopFinish = TimerSendKeys "{enter}"PauseTime = speedStart = TimerDo While Timer < Start + PauseTime DoEventsLoopFinish = TimerSendKeys "{enter}"Next kkNext jjNext iiCase 4For ii = 0 To 61For jj = 0 To 61For kk = 0 To 61For ll = 0 To 61PD = st(ii) & nd(jj) & th3(kk) & th4(ll) SendKeys PDPauseTime = speedStart = TimerDo While Timer < Start + PauseTime DoEventsLoopFinish = TimerSendKeys "{enter}"PauseTime = speedStart = TimerDo While Timer < Start + PauseTime DoEventsLoopFinish = TimerSendKeys "{enter}"Next llNext kkNext jjNext iiCase 5For ii = 0 To 61For jj = 0 To 61For kk = 0 To 61For ll = 0 To 61For mm = 0 To 61PD = st(ii) & nd(jj) & th3(kk) & th4(ll) & th5(mm) SendKeys PDPauseTime = speedStart = TimerDo While Timer < Start + PauseTime DoEventsLoopFinish = TimerSendKeys "{enter}"PauseTime = speedStart = TimerDo While Timer < Start + PauseTime DoEventsLoopFinish = TimerSendKeys "{enter}"Next mmNext llNext kkNext jjNext iiCase 6For ii = 0 To 61For jj = 0 To 61For kk = 0 To 61For ll = 0 To 61For mm = 0 To 61For nn = 0 To 61PD = st(ii) & nd(jj) & th3(kk) & th4(ll) & th5(mm) & th6(nn) SendKeys PDPauseTime = speedStart = TimerDo While Timer < Start + PauseTimeDoEventsLoopFinish = TimerSendKeys "{enter}"PauseTime = speedStart = TimerDo While Timer < Start + PauseTimeDoEventsLoopFinish = TimerSendKeys "{enter}"Next nnNext mmNext llNext kkNext jjNext iiCase 7For ii = 0 To 61For jj = 0 To 61For kk = 0 To 61For ll = 0 To 61For mm = 0 To 61For nn = 0 To 61For oo = 0 To 61PD = st(ii) & nd(jj) & th3(kk) & th4(ll) & th5(mm) & th6(nn) & th7(oo)SendKeys PDPauseTime = speedStart = TimerDo While Timer < Start + PauseTimeDoEventsLoopFinish = TimerSendKeys "{enter}"PauseTime = speedStart = TimerDo While Timer < Start + PauseTimeDoEventsLoopFinish = TimerSendKeys "{enter}"Next ooNext nnNext mmNext llNext kkNext jjNext iiCase 8For ii = 0 To 61For jj = 0 To 61For kk = 0 To 61For ll = 0 To 61For mm = 0 To 61For nn = 0 To 61For oo = 0 To 61For pp = 0 To 61PD = st(ii) & nd(jj) & th3(kk) & th4(ll) & th5(mm) & th6(nn) & th7(oo) & th8(pp)SendKeys PDPauseTime = speedStart = TimerDo While Timer < Start + PauseTimeDoEventsLoopFinish = TimerSendKeys "{enter}"PauseTime = speedStart = TimerDo While Timer < Start + PauseTimeDoEventsLoopFinish = TimerSendKeys "{enter}"Next ppNext ooNext nnNext mmNext llNext kkNext jjNext iiEnd SelectFor JK = 1 To 100If Sheet1.Cells(JK, 2) = "" ThenSheet1.Cells(JK, 2) = NowExit ForElseEnd IfNext JKEnd Sub破解宏密码步骤5:按F5执行代码,输入密码长度。

excel宏解除工作表密码

excel宏解除工作表密码

1\打开文件2\工具---宏-———录制新宏—--输入名字如:aa 3\停止录制(这样得到一个空宏)4\工具-—-宏———-宏,选aa,点编辑按钮5\删除窗口中的所有字符(只有几个),替换为下面的内容:(你复制吧) Option ExplicitPublic Sub AllInternalPasswords() ’Breaks worksheet 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 (Version 1.1) ' Modified 2003-Apr—04 by JEM:All msgs to constants, and ' eliminate one Exit Sub (Version 1。

1。

1)’Reveals hashed passwords NOT original passwords Const DBLSPACE As String = vbNewLine &vbNewLine Const AUTHORS As String = DBLSPACE & vbNewLine & _ ”Adapted from Bob McCormick base code by”&_ "Norman Harker and JE McGimpsey”Const HEADER As String = ”AllInternalPasswords User Message" Const VERSION As String = DBLSPACE &"Version 1.1.1 2003-Apr-04" Const REPBACK As String = DBLSPACE & ”Please report failure ”& _ "to the microsoft。

破解EXCEL表格保护密码宏代码

破解EXCEL表格保护密码宏代码

Option ExplicitPublic Sub AllInternalPasswords()' Breaks worksheet 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 (Version 1.1)' Modified 2003-Apr-04 by JEM: All msgs to constants, and' eliminate one Exit Sub (Version 1.1.1)' 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 Message"Const VERSION As String = DBLSPACE & "Version 1.1.1 2003-Apr-04" Const REPBACK As String = DBLSPACE & "Please report failure " & _"to the microsoft.public.excel.programming newsgroup."Const ALLCLEAR As String = DBLSPACE & "The workbook should " & _ "now be free of all password protection, so make sure you:" & _ DBLSPACE & "SAVE IT NOW!" & DBLSPACE & "and also" & _ DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _DBLSPACE & "Also, remember that the password was " & _"put there for a reason. Don't stuff up crucial formulas " & _"or data." & DBLSPACE & "Access and use of some data " & _"may be an offense. If in doubt, don't."Const MSGNOPWORDS1 As String = "There were no passwords on " & _ "sheets, or workbook structure or windows." & AUTHORS & VERSION Const MSGNOPWORDS2 As String = "There was no protection to " & _ "workbook structure or windows." & DBLSPACE & _"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 computer's 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 & _ "Note 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 & VERSION Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _ "password set." & DBLSPACE & "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 MSGONLYONE 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 Integer, i2 As IntegerDim i3 As Integer, i4 As Integer, i5 As Integer, i6 As IntegerDim PWord1 As StringDim ShTag As Boolean, WinTag As BooleanApplication.ScreenUpdating = FalseWith ActiveWorkbookWinTag = .ProtectStructure Or .ProtectWindowsEnd WithShTag = FalseFor Each w1 In WorksheetsShTag = ShTag Or w1.ProtectContentsNext w1If Not ShTag And Not 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 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.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 = 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, HEADERExit Do 'Bypass all for...nextsEnd IfEnd WithNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfIf WinTag And Not ShTag ThenMsgBox MSGONLYONE, vbInformation, HEADERExit SubEnd IfOn Error Resume NextFor Each w1 In Worksheets'Attempt clearance with PWord1w1.Unprotect PWord1Next w1On Error GoTo 0ShTag = FalseFor Each w1 In Worksheets'Checks for all clear ShTag triggered to 1 if not. ShTag = ShTag Or w1.ProtectContentsNext 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 66 For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 .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 Not .ProtectContents 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(MSGPWORDFOUND2, _ "$$", PWord1), vbInformation, HEADER'leverage finding Pword by trying on other sheetsFor Each w2 In Worksheetsw2.Unprotect PWord1Next w2Exit Do 'Bypass all for...nextsEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfEnd WithNext w1End IfMsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER End Sub。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

破解excel 加密宏命令Option Explicit Public Sub AllInternal Password s()' Breaks worksheet and workbook structure password s. Bob McCormic k' probably originator of base code algorithm modified for coverage ' of workbook structure / windows password s and for multiple password s'' Norman Harker and JE McGimps ey 27-Dec-2002 (Version 1.1)' Modified 2003-Apr-04 by JEM: All msgs to constants, and' eliminate one Exit Sub (Version 1.1.1)' Reveals hashed password s NOT original password sConst DBLSPA CE As String = vbNewLin e & vbNewLin eConst AUTHOR S As String = DBLSPA CE & vbNewLin e & _ Adapted from Bob McCormic k base code by & _ Norman Harker and JE McGimps eyAs String = "AllInterna lPassword s User Message" Const VERSION As String = DBLSPA CE & "Version 1.1.1 2003-Apr-04" Const REPBAC K As String = DBLSPA CE & "Please report failure " & _to the microsoft. public.exc el.progra mming newsgrou p.Const ALLCLEA R As String = DBLSPA CE & "The workbook should " & _password protection , so make sure you: & _ DBLSPA CE & "SAVE IT NOW!" & DBLSPA CE & "and also" & _ DBLSPA CE & "BACKUP !, BACKUP! !, BACKUP! !!" & _ DBLSPA CE & "Also, remember that the password was " & _ put there for a reason. Don't stuff up crucial formulas & _or data. & DBLSPA CE & "Access and use of some data " & _ may be an offense. If in doubt,WORDS1 As String = "There were no password s on " & _ sheets, or workbook structure or windows. & AUTHOR S & VERSION Const MSGNOP WORDS2 As String = "There was no protection to " & _ workbook structure or windows. & DBLSPA CE & _ Proceedin g to unprotect sheets. & AUTHOR S & VERSION Const MSGTAK ETIME As String = "After pressing OK button this " & _some time. & DBLSPA CE & "Amount of time " & _ depends on how many different password s, the & _ password s, and your computer' s specificati on. & DBLSPA CE & _ Just be patient! Make me a coffee! & AUTHOR S & VERSION Const MSGPW ORDFOU ND1 As String = "You had a Workshee t " & _ Structure or Windows Password set. & DBLSPA CE & _The password found was: & DBLSPA CE & "$$" & DBLSPA CE & _ Note it down for potential future use in other workbook s by & _ the same person who set this password. & DBLSPA CE & _ Now to check and clear other password s. & AUTHOR S & Const MSGPW ORDFOU ND2 As String = "You had a Workshee t " & _ password set. & DBLSPA CE & "The password found was: " & _CE & "$$" & DBLSPA CE & "Note it down for potential " & _ future use in other workbook s by same person who & _ set this password. & DBLSPA CE & "Now to check and clear " & _ other password s. & AUTHOR S & VERSION Const MSGONL YONE As String = "Only structure / windows " & _ protected with the password that was just found. & _R & AUTHOR S & VERSION & REPBAC KDim w1 As Workshee t, w2 As Workshee tDim i As Integer, j As Integer, k As Integer, l As Integer Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer Dim PWord1 As String Dim ShTag As Boolean, WinTag As Boolean Applicatio n.Screen Updating = FalseWith ActiveWor kbook WinTag = .ProtectSt ructure Or .ProtectW indows End With ShTag = FalseFor Each w1 In Workshee tsShTag = ShTag Or w1.Protec tContents Next w1 If Not ShTag And Not WinTag Then MsgBox MSGNOP WORDS1 , vbInforma tion, HEADER Exit Sub End If MsgBox MSGTAK ETIME, vbInforma tion, HEADER If Not WinTag ThenWORDS2 , vbInforma tion, HEADER ElseOn Error Resume NextDo'dummy do loop For 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 66 For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 With ActiveWor kbook.Unprotect Chr(i) & Chr(j) & Chr(k) & _Chr(i1) & Chr(i2) & _Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)If.ProtectSt ructure = False And _.ProtectW indows = False Then PWord1 = 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 Applicatio n.Substitu te(MSGP WORDFO UND1, _ $$, PWord1), vbInforma tion, HEADER Exit Do'Bypass all for...nexts End IfNext: Next: Next: Next: Next: Next: Next: Next: Next: Loop Until TrueOn Error GoTo 0 End IfIf WinTag And Not ShTag Then MsgBox MSGONL YONE, vbInforma tion, HEADER Exit Sub End IfOn Error Resume NextFor Each w1 In Workshee ts'Attempt clearance with PWord1 w1.Unprot ect PWord1 Next w1 On Error GoTo 0 ShTag = FalseWorkshee ts'Checks for all clear ShTag triggered to 1 if not. ShTag = ShTag Or w1.Protec tContents Next w1 If ShTag ThenFor Each w1 In Workshee tsWith w1 If.ProtectC ontents ThenOn Error Resume NextDo'Dummy do loop For 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 i3 = 65 To 66: For i4 = 65 To 66 For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126.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 Not.ProtectC ontents Then PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _ Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)n.Substitu te(MSGP WORDFO UND2, _ $$, PWord1), vbInforma tion, HEADER 'leverage finding Pword by trying on other sheets For Each w2 In Workshee tsw2.Unprot ect PWord1 Next w2 Exit Do'Bypass all for...nexts End If Next: Next: Next: Next: Next: Next: Next: Next: Next: Next: Loop Until TrueOn Error GoTo 0 End If End With Next w1 End IfR & AUTHOR S & VERSION & REPBAC K, vbInforma tion, HEADER End Sub。

相关文档
最新文档