破解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
在此再次感谢大神们的分享!同时,一门技术是好是坏,全凭个人掌握,用于益处是为好……。

【免费下载】Excel 宏破解方法

【免费下载】Excel 宏破解方法

如何破解Excel的工作表保护今天学到了一招如何用宏破解Excel工作表保护的方法,拿来与大家共享一下。

1、首先新建一个新的工作簿;2、然后选择“工具”“宏”“VB编辑器”;3、进入到“VB编辑器”后双击左边的Sheet1,在右边的“代码”编辑栏内把下面的宏命令复制到里面;4、再把你要解除保护的EXCEL表打开;5、然后,返回到“VB编辑器”单击上面工具栏的绿色“ play”按钮;6、接着,会出现一个对话框单击“确定”,之后你等2、3分钟后还会弹出一个对话框,这时你只需要连点两次“确定”后你所需要解除保护的工作溥内的所有表就全部解除了。

下面是这个宏的代码: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, HEADEREnd IfMsgBox MSGTAKETIME, vbInformation, HEADERIf Not WinTag ThenMsgBox MSGNOPWORDS2, vbInformation, HEADER ElseOn 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 0If 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 Sub。

利用VBA宏解除Excel保护

利用VBA宏解除Excel保护

利⽤VBA宏解除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 & 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 & VERSIONConst 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.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)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 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中的宏密码

解除excel中的宏密码

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

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

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

用宏代码破解密码:以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加密文件的解决办法

关于破解Excel加密文件的解决办法

关于破解Excel加密文件的解决办法Excel加密文件是一种保护电子表格数据的安全措施,但有时候我们可能会遇到需要破解这种加密文件的情况。

虽然这涉及到一个敏感话题,但是我将尽力提供一些建议和解决办法。

在开始之前,我要强调,破解Excel加密文件是非法行为,在大多数地区都属于违法行为,这可能会对你产生严重的法律后果。

因此,在你采取任何行动之前,请确保你有合法的权限和法律允许。

然而,如果你是忘记了Excel加密文件的密码,并且拥有合法权限,那么我们可以尝试以下几种方法来解决这个问题。

2. 使用VBA宏:Excel提供了一种名为Visual Basic for Applications(VBA)的编程语言。

通过创建和运行VBA宏,你可以绕过密码保护,打开Excel加密文件。

这需要一些编程技能,但是它可能是一种可行的解决办法。

你可以并学习有关在Excel中使用VBA宏破解密码保护的教程和示例。

除了以上提到的方法,还有其他一些可能的解决办法。

例如,通过将加密文件发送给相关的技术支持人员或专家,请他们帮忙解决问题。

或者通过重置Excel应用程序的设置来删除密码保护。

利用宏解除excl工作表保护

利用宏解除excl工作表保护
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 i3 = 65 To 66: For i4 = 65 To 66
DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _
DBLSPACE & "Also, remember that the password was " & _
"put there for a reason. Don't stuff up crucial formulas " & _
Const MSGONLYONE As String = "Only structure / windows " & _
"protected with the password that was just found." & _
ALLCLEAR & AUTHORS & VERSION & REPBACK
"Proceeding to unprotect sheets." & AUTHORS & VERSION
Const MSGTAKETIME As String = "After pressing OK button this " & _
"will take some time." & DBLSPACE & "Amount of time " & _

用VBA宏代码破解EXCEL保护

用VBA宏代码破解EXCEL保护

用VBA宏代码破解EXCEL保护第一步:打开该文件,先解除默认的“宏禁用”状态。

方法是:把工具栏下的【宏】→【安全性】中的【安全级】设置为中或者为低即可。

再切换到工具栏下的【宏】→【录制新宏】,出现“录制新宏”窗口,在“宏名”定义一个名称为:PassWordBreaker,点击“确定”退出;第二步:再点击工具栏下的【宏】→【宏(M)】,选择“宏名”下的“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第三步:再点击工具栏下的【宏】→【宏(M)】,选择“宏名”下的“PasswordBreaker”并点击“执行”,密码就现形了。

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表格

破解受保护的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 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 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.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 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宏密码的方法

如何破解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工作表保护破解

excel工作表保护破解Excel工作表保护破解。

在日常工作中,我们经常会使用Excel表格来存储和处理数据。

为了保护数据的安全性,我们经常会对Excel工作表进行保护。

但有时候我们会遇到需要修改或编辑被保护的工作表的情况,这就需要我们学会如何破解Excel工作表的保护。

破解Excel工作表保护并不是一件复杂的事情,下面我将向大家介绍几种常用的方法。

第一种方法是通过VBA代码来破解Excel工作表保护。

首先,我们需要按下Alt + F11组合键,打开VBA编辑器。

然后在新建的模块中输入以下代码:Sub UnprotectSheet()。

Dim ws As Worksheet。

For Each ws In ThisWorkbook.Worksheets。

ws.Unprotect Password:="yourpassword"Next ws。

End Sub。

在上面的代码中,yourpassword是你设置的工作表保护密码。

执行完上述代码后,所有工作表的保护都会被解除。

第二种方法是通过在线工具来破解Excel工作表保护。

有一些在线工具可以帮助我们破解Excel工作表的保护,例如LostMyPass、Password-Find等。

我们只需要上传被保护的Excel文件,这些工具就可以帮我们破解保护密码。

第三种方法是通过修改Excel文件的扩展名来破解Excel工作表保护。

我们可以将Excel文件的扩展名修改为.zip,然后解压缩这个压缩文件。

在解压缩后的文件夹中,我们可以找到xl目录,里面包含了workbook.xml和worksheets文件夹。

我们可以用记事本打开workbook.xml文件,找到<workbookProtection>节点,将其删除或者修改为<workbookProtection lockStructure="0" lockWindows="0"/>,然后保存文件。

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.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 crucialformulas " &_ "or data。

excel文件密码破解方法

excel文件密码破解方法

excel文件密码破解方法
要破解Excel文件的密码,有几种方法可以尝试。

以下是一些常用的方法:
1. 使用密码破解软件,有一些专门的密码破解软件可以帮助你破解Excel文件密码。

这些软件通常使用暴力破解或字典攻击等方法来尝试破解密码。

你可以在互联网上找到一些可靠的密码破解软件,但请注意使用合法的目的。

2. 使用VBA宏,如果Excel文件中启用了VBA宏,你可以通过编写一段简单的VBA代码来破解密码。

这种方法需要一定的编程知识,但可以尝试使用一些已有的VBA代码来破解密码。

3. 使用在线密码破解服务,有一些在线服务可以帮助你破解Excel文件密码。

你只需上传文件并等待服务破解密码。

然而,这种方法可能不是很安全,因为你需要将文件上传到第三方服务器。

4. 使用备份文件,如果你有Excel文件的备份副本,并且这个副本没有密码保护,你可以打开备份文件并保存为没有密码保护的新文件。

这种方法适用于你只是丢失了密码的情况。

5. 密码提示,有时候,Excel文件的创建者会设置密码提示。

如果你记得密码提示的内容,你可以尝试使用密码提示来回忆密码。

需要注意的是,破解密码是一项敏感的行为,应该遵守法律和
道德规范。

在尝试破解密码之前,请确保你有合法的权限来打开该
文件,并且尊重他人的隐私。

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

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

使⽤宏命令撤销EXCEL⼯作表保护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 & "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 & VERSIONConst 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 Boolean Application.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 SubEnd IfMsgBox MSGTAKETIME, vbInformation, HEADERIf Not WinTag ThenMsgBox MSGNOPWORDS2, vbInformation, HEADER ElseOn 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 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, vbInformation, HEADEREnd Sub6. 关闭编辑窗⼝7. ⼯具---宏-----宏,选AllInternalPasswords,运⾏,确定两次,等2分钟(确实有这么长时间),再确定.OK。

excel表格忘记密码怎么破解

excel表格忘记密码怎么破解

excel表格忘记密码怎么破解一些有着重要的excel文件,工作表肯定会添加密码,但是有时会忘记密码,这是该如何破解呢?其实设置方法不难,有简单暴力的方法,下面随一起来看看excel表格破解工作表密码的方法,欢迎大家来到学习。

excel表格破解工作表密码的方法打开excel工作表。

然后在Excel表中找到【视图】。

点开【宏】。

然后选择【录制宏】。

接着会弹出一个窗口,点击【确定】。

在此点开【宏】,点击【停止录制】。

然后再点击【宏】,弹出窗口点击【编辑】。

然后点击【模板1】,并清空右边红框里的代码,如下图。

然后把破解代码复制粘贴进入空白处(破解代码将在文章最底部分享给大家)。

然后在打开【查看宏】,点击执行破解代码。

会弹出一个框,是英文的,看不懂没关系,点击确定,解密需要一段时间。

12破解代码:Public Sub AllInternalPasswords()&#39; Breaks worksheet and workbook structure passwords. Bob McCormick&#39; probably originator of base code algorithm modified for coverage&#39; of workbook structure / windows passwords and for multiple passwords&#39;&#39; Norman Harker and JE McGimpsey 27-Dec-2002 (Version 1.1)&#39; Modified 2003-Apr-04 by JEM: All msgs to constants, and&#39; eliminate one Exit Sub (Version 1.1.1)&#39; Reveals hashed passwords NOT original passwords Const DBLSPACE As String = vbNewLine &amp; vbNewLineConst AUTHORS As String = DBLSPACE &amp; vbNewLine &amp; _&quot;Adapted from Bob McCormick base code by&quot; &amp; _&quot;Norman Harker and JE McGimpsey&quot;Const HEADER As String = &quot;AllInternalPasswords User Message&quot;Const VERSION As String = DBLSPACE &amp; &quot;Version 1.1.1 2003-Apr-04&quot;Const REPBACK As String = DBLSPACE &amp; &quot;Please report failure &quot; &amp; _&quot;to the microsoft.public.excel.programming newsgroup.&quot;Const ALLCLEAR As String = DBLSPACE &amp; &quot;The workbook should &quot; &amp; _&quot;now be free of all password protection, so make sure you:&quot; &amp; _DBLSPACE &amp; &quot;SAVE IT NOW!&quot; &amp; DBLSPACE &amp; &quot;and also&quot; &amp; _DBLSPACE &amp; &quot;BACKUP!, BACKUP!!, BACKUP!!!&quot; &amp; _DBLSPACE &amp; &quot;Also, remember that the password was &quot; &amp; _&quot;put there for a reason. Don&#39;t stuff up crucial formulas &quot; &amp; _&quot;or data.&quot; &amp; DBLSPACE &amp; &quot;Access and use of some data &quot; &amp; _ &quot;may be an offense. If in doubt, don&#39;t.&quot;Const MSGNOPWORDS1 As String = &quot;There wereno passwords on &quot; &amp; _&quot;sheets, or workbook structure or windows.&quot; &amp; AUTHORS &amp; VERSIONConst MSGNOPWORDS2 As String = &quot;There was no protection to &quot; &amp; _&quot;workbook structure or windows.&quot; &amp; DBLSPACE &amp; _&quot;Proceeding to unprotect sheets.&quot; &amp; AUTHORS &amp; VERSIONConst MSGTAKETIME As String = &quot;After pressing OK button this &quot; &amp; _&quot;will take some time.&quot; &amp; DBLSPACE &amp; &quot;Amount of time &quot; &amp; _&quot;depends on how many different passwords, the &quot; &amp; _&quot;passwords, and your computer&#39;s specification.&quot; &amp; DBLSPACE &amp; _&quot;Just be patient! Make me a coffee!&quot; &amp; AUTHORS &amp; VERSIONConst MSGPWORDFOUND1 As String = &quot;You had a Worksheet &quot; &amp; _&quot;Structure or Windows Password set.&quot; &amp;DBLSPACE &amp; _&quot;The password found was: &quot; &amp; DBLSPACE &amp; &quot;&quot; &amp; DBLSPACE &amp; _&quot;Note it down for potential future use in other workbooks by &quot; &amp; _&quot;the same person who set this password.&quot; &amp; DBLSPACE &amp; _&quot;Now to check and clear other passwords.&quot; &amp; AUTHORS &amp; VERSIONConst MSGPWORDFOUND2 As String = &quot;You had a Worksheet &quot; &amp; _&quot;password set.&quot; &amp; DBLSPACE &amp; &quot;The password found was: &quot; &amp; _DBLSPACE &amp; &quot;&quot; &amp; DBLSPACE &amp; &quot;Note it down for potential &quot; &amp; _&quot;future use in other workbooks by same person who &quot; &amp; _&quot;set this password.&quot; &amp; DBLSPACE &amp; &quot;Now to check and clear &quot; &amp; _&quot;other passwords.&quot; &amp; AUTHORS &amp; VERSIONConst MSGONLYONE As String = &quot;Only structure /windows &quot; &amp; _&quot;protected with the password that was just found.&quot; &amp; _ALLCLEAR &amp; AUTHORS &amp; VERSION &amp; 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 Integer Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer Dim PWord1 As StringDim ShT ag As Boolean, WinTag As BooleanApplication.ScreenUpdating = FalseWith ActiveWorkbookWinTag = .ProtectStructure Or .ProtectWindowsEnd WithShT ag = FalseFor Each w1 In WorksheetsShT ag = ShTag Or w1.ProtectContentsNext w1If Not ShTag And Not WinTag ThenMsgBox MSGNOPWORDS1, vbInformation, HEADERExit SubEnd IfMsgBox MSGTAKETIME, vbInformation, HEADERIf Not WinT ag ThenMsgBox MSGNOPWORDS2, vbInformation, HEADERElseOn Error Resume NextDo &#39;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) &amp; Chr(j) &amp; Chr(k) &amp; _Chr(l) &amp; Chr(m) &amp; Chr(i1) &amp; Chr(i2) &amp; _ Chr(i3) &amp; Chr(i4) &amp; Chr(i5) &amp; Chr(i6) &amp; Chr(n)If .ProtectStructure = False And _.ProtectWindows = False ThenPWord1 = Chr(i) &amp; Chr(j) &amp; Chr(k) &amp; Chr(l) &amp; _Chr(m) &amp; Chr(i1) &amp; Chr(i2) &amp; Chr(i3) &amp; _Chr(i4) &amp; Chr(i5) &amp; Chr(i6) &amp; Chr(n) MsgBox Application.Substitute(MSGPWORDFOUND1, _ &quot;&quot;, PWord1), vbInformation, HEADERExit Do &#39;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 ShT ag ThenMsgBox MSGONLYONE, vbInformation, HEADERExit SubEnd IfOn Error Resume NextFor Each w1 In Worksheets&#39;Attempt clearance with PWord1w1.Unprotect PWord1Next w1On Error GoTo 0ShT ag = FalseFor Each w1 In Worksheets&#39;Checks for all clear ShTag triggered to 1 if not.ShT ag = ShTag Or w1.ProtectContentsNext w1If ShT ag ThenFor Each w1 In WorksheetsWith w1If .ProtectContents ThenOn Error Resume NextDo &#39;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) &amp; Chr(j) &amp; Chr(k) &amp; _Chr(l) &amp; Chr(m) &amp; Chr(i1) &amp; Chr(i2) &amp; Chr(i3) &amp; _Chr(i4) &amp; Chr(i5) &amp; Chr(i6) &amp; Chr(n)If Not .ProtectContents ThenPWord1 = Chr(i) &amp; Chr(j) &amp; Chr(k) &amp; Chr(l) &amp; _Chr(m) &amp; Chr(i1) &amp; Chr(i2) &amp; Chr(i3) &amp;_Chr(i4) &amp; Chr(i5) &amp; Chr(i6) &amp; Chr(n)MsgBox Application.Substitute(MSGPWORDFOUND2, _&quot;&quot;, PWord1), vbInformation, HEADER&#39;leverage finding Pword by trying on other sheetsFor Each w2 In Worksheetsw2.Unprotect PWord1Next w2Exit Do &#39;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 &amp; AUTHORS &amp; VERSION &amp; REPBACK, vbInformation, HEADEREnd Sub11。

Excel破解宏代码

Excel破解宏代码

Excel破解宏代码Excel工作表保护密码破解方法:1\打开文件2\工具---宏----录制新宏---输入名字如:aa3\停止录制(这样得到一个空宏)4\工具---宏----宏,选aa,点编辑按钮5\删除窗口中的所有字符(只有几个),替换为下面的内容:(复制吧)6\关闭编辑窗口7\工具---宏-----宏,选AllInternalPasswords,运行,确定两次,等2分钟,再确定.OK,密码完全被你看见了!!内容如下:Public Sub AllInternalPasswords()' Breaks worksheet andworkbook structure passwords. Bob McCormick' probably 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 NOT original passwordsConst DBLSPACE As String = vbNewLine &amp; vbNewLineConst AUTHORS As String = DBLSPACE &amp; vbNewLine &amp; _"Adapted from Bob McCormick base code by" &amp; _ "Norman Harker and JEMcGimpsey"Const HEADER As String = "AllInternalPasswords User Message"Const VERSION As String = DBLSPACE &amp; "Version 1.1.1 2003-Apr-04"Const REPBACK As String = DBLSPACE &amp; "Please report failure " &amp; _"to the microsoft.public.excel.programming newsgroup." Const ALLCLEAR AsString = DBLSPACE &amp; "The workbook should " &amp; _ "now be free of allpassword protection, so make sure you:" &amp; _ DBLSPACE &amp; "SA VE ITNOW!" &amp; DBLSPACE &amp; "and also" &amp; _ DBLSPACE &amp; "BACKUP!,BACKUP!!, BACKUP!!!" &amp; _DBLSPACE &amp; "Also, remember that thepassword was " &amp; _"put there for a reason. Don't stuff up crucialformulas " &amp; _"or data." &amp; DBLSPACE &amp; "Access and use of some data " &amp; _"may be an offense. If in doubt, don't."ConstMSGNOPWORDS1 As String = "There were no passwords on " &amp; _"sheets, orworkbook structure or windows." &amp; AUTHORS &amp; VERSIONConstMSGNOPWORDS2 As String = "There was no protection to " &amp; _"workbookstructure or windows." &amp; DBLSPACE &amp; _ "Proceeding to unprotectsheets." &amp; AUTHORS &amp; VERSIONConst MSGTAKETIME As String = "Afterpressing OK button this " &amp; _"will take some time." &amp; DBLSPACE&amp; "Amount of time " &amp; _"depends on how many different passwords,the " &amp; _"passwords, and your computer's specification." &amp; DBLSPACE&amp; _"Just be patient! Make me a coffee!" &amp; AUTHORS &amp; VERSIONConst MSGPWORDFOUND1 As String = "You had a Worksheet " &amp; _"Structure or Windows Password set." &amp; DBLSPACE&amp; _"Thepassword found was: " &amp; DBLSPACE &amp; "$$" &amp; DBLSPACE &amp; _"Noteit down for potential future use in other workbooks by " &amp; _"the sameperson who set this password." &amp; DBLSPACE &amp; _ "Now to check andclear other passwords." &amp; AUTHORS &amp; VERSION Const MSGPWORDFOUND2 AsString = "You had a Worksheet " &amp; _"password set." &amp; DBLSPACE &amp;"The password found was: " &amp; _DBLSPACE &amp; "$$" &amp; DBLSPACE &amp;"Note it down for potential " &amp; _"future use in other workbooks by sameperson who " &amp; _"set this password." &amp; DBLSPACE &amp; "Now to check and clear " &amp; _"other passwords." &amp; AUTHORS &amp; VERSION ConstMSGONLYONE As String = "Only structure / windows " &amp; _"protected withthe password that was just found." &amp; _ALLCLEAR &amp; AUTHORS &amp;VERSION &amp; REPBACKDim w1 As Worksheet, w2 As WorksheetDim i AsInteger, j As Integer, k As Integer, l As IntegerDim m As Integer, n AsInteger, i1 As Integer, i2 As IntegerDim i3 As Integer, i4 As Integer, i5As Integer, i6 As IntegerDim PWord1 As StringDim ShTag As Boolean,WinTag As BooleanApplication.ScreenUpdating = FalseWith ActiveWorkbookWinTag =.ProtectStructure Or .ProtectWindowsEnd WithShTag = FalseFor Eachw1 In WorksheetsShTag = ShTag Or w1.ProtectContentsNext w1If NotShTag And Not WinTag ThenMsgBox MSGNOPWORDS1, vbInformation, HEADERExit SubEnd IfMsgBox MSGTAKETIME, vbInformation, HEADERIf NotWinTag ThenMsgBox MSGNOPWORDS2, vbInformation, HEADERElseOn ErrorResume 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) &amp;Chr(j) &amp; Chr(k) &amp; _Chr(l) &amp; Chr(m) &amp; Chr(i1) &amp; Chr(i2)&amp; _Chr(i3) &amp; Chr(i4) &amp; Chr(i5) &amp; Chr(i6) &amp; Chr(n)If .ProtectStructure = False And _.ProtectWindows = False ThenPWord1 = Chr(i) &amp; Chr(j) &amp; Chr(k) &amp; Chr(l) &amp; _Chr(m)&amp; Chr(i1) &amp; Chr(i2) &amp; Chr(i3) &amp; _ Chr(i4) &amp; Chr(i5)&amp; Chr(i6) &amp; 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 IfIfWinTag And Not ShTag ThenMsgBox MSGONLYONE, vbInformation, HEADERExitSubEnd IfOn Error Resume NextFor Each w1 In Worksheets'Attempt clearance with PWord1w1.Unprotect PWord1Next w1OnError GoTo 0ShTag = FalseFor Each w1 In Worksheets'Checks for allclear 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 To66: For i1 = 65 To 66For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To66For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 .UnprotectChr(i) &amp; Chr(j) &amp; Chr(k) &amp; _Chr(l) &amp; Chr(m) &amp; Chr(i1)&amp; Chr(i2) &amp; Chr(i3) &amp; _Chr(i4) &amp; Chr(i5) &amp; Chr(i6)&amp; Chr(n)If Not .ProtectContents ThenPWord1 = Chr(i) &amp; Chr(j)&amp; Chr(k) &amp; Chr(l) &amp; _Chr(m) &amp; Chr(i1) &amp; Chr(i2) &amp;Chr(i3) &amp; _Chr(i4) &amp; Chr(i5) &amp; Chr(i6) &amp; Chr(n)MsgBoxApplication.Substitute(MSGPWORDFOUND2, _ "$$", PWord1), vbInformation,HEADER'leverage finding Pword by trying on other sheets For Each w2 InWorksheetsw2.Unprotect PWord1Next w2Exit Do 'Bypass allfor...nextsEnd IfNext: Next: Next: Next: Next: NextNext: Next:Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfEnd WithNext w1End IfMsgBox ALLCLEAR &amp; AUTHORS &amp;VERSION &amp; REPBACK, vbInformation, HEADEREnd SubEXCEL工程密破解,以下方法十分有效的帮你打开VBA工程密码保护的工程,教你破解VBA工程密码,解除VBA工程密码保护下的EXCEL文档,破解EXCEL原来如此简单.--------------在办公中我们常看到许多用宏(VBA)编写的EXCEL表格,而这些表格就如同一个数据库,我们可以选取或查询很多的数据,一般的这些数据是存放在一个隐藏的工作表中的,那么要如何显示这个隐藏的工作表呢?我们可以打开宏编辑器(ALT+F11),再安CTRL+R打开专案,这时弹出窗会有所有的这个EXCEL的工用表,这时你就可以看看那些是被隐藏的了,很多时候打开是需要密码的,用以下方法解密后,再将解密后文件打开,依同样方法在工作表标签中右键&gt;&gt;检视程式码&gt;&gt;复制以下代码&gt;&gt;按F8执行Private Sub CommandButton1_Click()Worksheets("这里为你要显示的工作表名称").Visible = True End Sub关于破解EXCELVBA工程密码的方法,以下代码非常有效,首先建一新EXCEL文件,在工作表标签处右点&gt;&gt;检视程式码&gt;&gt;复制以下代码&gt;&gt;按F8执行在弹出窗中选你要你破解工程密码的EXCEL文件&gt;&gt;再按F5执行即可.Private Sub VBAPassword()'你要解保护的Excel文件路径Filename =Application.GetOpenFilename("Excel文件(*.xls &amp; *.xla &amp;*.xlt),*.xls;*.xla;*.xlt", , "VBA破解")If Dir(Filename) = "" ThenMsgBox "没找到相关文件,清重新设置。

破解Excel保护密码的方法

破解Excel保护密码的方法

Excel忘记密码怎么办???如果你为你的Excel文件设置了密码,但时间久了遗忘了密码,要破解excel保护密码。

那么,请你按照下面的步骤来做,将会使你有惊喜的收获。

(1、这需要几分钟的时间;2、在操作前请先将原文件备份一份,一定要备份哦!!!)。

具体方法如下:1、打开文件2、工具---宏----录制新宏---输入名字如:aa3、停止录制(这样得到一个空宏)4、工具---宏----宏,选aa,点编辑按钮5、删除窗口中的所有字符(只有几个),替换为下面的内容: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 & 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 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, HEADERElseDo ''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 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 ThenDo ''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, HEADEREnd Sub6关闭编辑窗口7工具---宏-----宏,选AllInternalPasswords,运行,确定,共两次,等2分钟,再确定。

EXCEL密码保护用宏破解

EXCEL密码保护用宏破解

Excel,VBA宏破解的方法,步骤如下:1.点击“宏”→“录制宏”,出现“录制新宏”窗口,在“宏名”定义一个名称为:PasswordBreaker,点击“确定”退出;2.再点击“宏”→“查看宏”,选择“宏名”下的“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 Sub3.再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“执行”,密码就现形了。

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

破解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 McGimpseyConst 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.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, vbInformation, HEADER End Sub。

相关文档
最新文档