EXCEL密码去除-用宏的方式

合集下载

EXCEL密码去除(工作表、工作薄密码保护破解)

EXCEL密码去除(工作表、工作薄密码保护破解)

各位朋友不知道有没有碰到过这样的情况,当你要打开一个EXECL工作表时,突然发现密码忘记了,唯一可做的也许是搞个破解软件来破一下,但针对打开后的工作表保护,一般就很难有效了,复制虽是一种办法,但不少数据(特别是公式较多着),可能就要乱套了,入户才能破解这一类密码呢?不久前在网上发现此精华,与大家共享一下!利用宏运行方式破解,真的很有效,运行中可能电脑有两分钟无反应,千万不要以为死机了,等等吧!步骤方法如下:1.打开文件2.工具---宏---录制新宏---输入名字如:aa3.停止录制(这样得到一个空宏)4.工具---宏----宏,选aa,点编辑按钮5.删除窗口中的所有字符(只有几个),替换为下面的内容:(复制吧)6.关闭编辑窗口7.工具---宏----宏。

选AllInternalPasswords,运行,确定两次,等两分钟,再确定,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 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)'Reveals hashed passwords NOT original passwordsConst DBLSPACE As String = vbNewLine & vbNewLineConst AUTHORS As String = DBLSPACE & vbNewLine & _"Adapted form 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 proteection, 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 areason. Don't stuff up crucial formulas" & _"or date/" & DBLSPACE & "Access and use of some data" & _"may be an offense.If in doubt,don't."Const MSGNOPWPRDS1 As String = "There were no passwords on" & _"sheet,or workbook struture or windows." & AUTHORS & VERSION Const MSGNOPWORD2 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 & _"Thq 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, 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 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 ActiveWorkbook.Unprotect Chr(i) & Chr(j) & Chr(k) & _Chr(1) & Chr(m) & Chr(i1) & Chr(i2) & _Chr(i3) & Chr(i4) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) If .ProtectStructure = False And _.ProtectWindows = False ThenPWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(1) & _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 triffered 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(1) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _Chr(i4) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)If Not .ProtectContents ThenPWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(1) & _Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)MsgBox Application.Substitute(MSGPWORDFOUND2, _"$$", PWord1), vbInformation, HEADER'leverrage 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好了,经测试有效,祝各位成功!。

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是一款非常广泛使用的电子表格软件,它可以帮助用户进行数据分析、计算、图表制作等操作。

但是,有时候我们会在Excel 表格中设置密码保护,以保护机密数据或防止其他人修改表格内容。

然而,当我们忘记密码或者需要修改内容时,我们可能需要去掉Excel 文件的密码保护。

下面是几种去掉Excel密码的方法。

方法一:使用密码破解工具有一些软件可以帮助用户去除Excel表格的密码,例如Excel Password Recovery、PassFab for Excel等。

这些软件可以帮助用户破解Excel表格的密码,让用户可以重新访问受保护的Excel文件。

方法二:使用VBA宏代码如果用户对VBA有一定的了解,可以通过编写宏代码来去除Excel文件的密码保护。

用户可以按照以下步骤进行操作:1. 打开受保护的Excel文件,并按下Alt + F11打开VBA编辑器。

2. 在VBA编辑器中,选择项目资源管理器中的“ThisWorkbook”。

3. 在“ThisWorkbook”中,粘贴以下代码并运行:```VBASub 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 66 For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 ActiveSheet.Unprotect Chr(i) & Chr(j) & Chr(k) & _Chr(l) & Chr(m) & i1 & i2 & i3 & i4 & i5 & i6 & Chr(n) If ActiveSheet.ProtectContents = False ThenMsgBox '密码破解成功,密码为:' & Chr(i) & Chr(j) & _Chr(k) & Chr(l) & Chr(m) & i1 & i2 & i3 & i4 & i5 & i6 & Chr(n)Exit SubEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextEnd Sub```该宏代码会尝试各种可能的密码组合,直到正确的密码被找到。

Excel表格密码保护的解除方法

Excel表格密码保护的解除方法

Excel表格密码保护的解除方法表格受密码保护时,我们修改数据Excel弹出“您试图更改的单元格或图表受保护,因而是只读的。

若要修改受保护单元格或图表,请先使用‘撤消工作表保护’命令(在‘审阅’选项卡的‘更改’组中)来取消保护。

可能会提示您输入密码。

这时候我们可以用VBA宏代码破解法来破解表格保护密码:第一步:打开该文件,先解除默认的“宏禁用”状态,方法是点击工具栏下的“选项”状态按钮,打开“Microsoft Office安全选项”窗口,选择其中的“启用此内容”,“确定”。

再切换到“视图”选项卡,点击“宏”→“录制宏”,出现“录制新宏”窗口,在“宏名”定义一个名称为:PasswordBreaker,点击“确定”退出;第二步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“编辑”,打开“MicrosoftVisualBasic”编辑器,用如下内容替换右侧窗口中的所有代码:SubPasswordBreaker()DimiAsInteger,jAsInteger,kAsIntegerDimlAsInteger,mAsInteger,nAsIntegerDimi1AsInteger,i2AsInteger,i3AsIntegerDimi4AsInteger,i5AsInteger,i6AsIntegerOnErrorResumeNextFori=65To66:Forj=65To66:Fork=65To66Forl=65To66:Form=65To66:Fori1=65To66Fori2=65To66:Fori3=65To66:Fori4=65To66Fori5=65To66:Fori6=65To66:Forn=32To126(i)&Chr(j)&Chr(k)&_Chr(l)&Chr(m)&Chr(i1)&Chr(i2)&Chr(i3)&_Chr(i4)&Chr(i5)&Chr(i6)&Chr(n)=FalseThenMsgBox"Oneusablepasswordis"&Chr(i)&Chr(j)&_Chr(k)&Chr(l)&Chr(m)&Chr(i1)&Chr(i2)&_Chr(i3)&Chr(i4)&Chr(i5)&Chr(i6)&Chr(n)(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)ExitSubEndIfNext:Next:Next:Next:Next:NextNext:Next:Next:Next:Next:NextEndSub第三步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“执行”,密码就现形了第四步:点击“撤消工作表保护”,然后输入密码即可解除锁定;测试结果,密码破解可用,但是很晕的是破解的密码跟原来的密码有很大的差距,想不明白了,反正能用就好。

EXCEL忘记密码怎么办?EXCEL工作表格模板怎么清除密码

EXCEL忘记密码怎么办?EXCEL工作表格模板怎么清除密码

如何破解EXCEL工作表保护密码1.工具---宏----录制新宏---输入名字如:hh3. 4工具---宏----宏,选hh,点编辑按钮3.10(这个图,如果工作表中有多组不同密码,每解开一组,就会提示一次,也就说可能会出现几次)ConstAUTHORSAsString=DBLSPACE&vbNewLine&_"作者:McCormick JEMcGimpsey"ConstHEADERAsString="工作表保护密码破解"ConstVERSIONAsString=DBLSPACE&"版本Version1.1.1"ConstREPBACKAsString=DBLSPACE&""ConstZHENGLIAsString=DBLSPACE&" hfhzi3—戊冥整理" ConstALLCLEARAsString=DBLSPACE&"该工作簿中的工作表密码保护已全部解除!!"&DBLSPACE&"请记得另保存"_&DBLSPACE&"注意:不要用在不当地方,要尊重他人的劳动成果!"ConstMSGNOPWORDS1AsString="该文件工作表中没有加密"ConstMSGNOPWORDS2AsString="该文件工作表中没有加密2" ConstMSGTAKETIMEAsString="解密需花费一定时间,请耐心等候!"&DBLSPACE&"按确定开始破解!"ConstMSGPWORDFOUND1AsString="密码重新组合为:"&DBLSPACE&"$$"&DBLSPACE&_ "如果该文件工作表有不同密码,将搜索下一组密码并修改清除"ConstMSGPWORDFOUND2AsString="密码重新组合为:"&DBLSPACE&"$$"&DBLSPACE&_ExitSubEndIfMsgBoxMSGTAKETIME,vbInformation,HEADERIfNotWinTagThenElseOnErrorResumeNextDo'dummydoloopFori=65To66:Forj=65To66:Fork=65To66 Forl=65To66:Form=65To66:Fori1=65To66 Fori2=65To66:Fori3=65To66:Fori4=65To66 Fori5=65To66:Fori6=65To66:Forn=32To126WithActiveWorkbook.UnprotectChr(i)&Chr(j)&Chr(k)&_Chr(l)&Chr(m)&Chr(i1)&Chr(i2)&_ Chr(i3)&Chr(i4)&Chr(i5)&Chr(i6)&Chr(n)ExitSubEndIfOnErrorResumeNextForEachw1InWorksheets'AttemptclearancewithPWord1w1.UnprotectPWord1Nextw1OnErrorGoTo0ShTag=FalseForEachw1InWorksheets'ChecksforallclearShTagtriggeredto1ifnot.ShTag=ShTagOrw1.ProtectContentsNextw1IfShTagThenForEachw1InWorksheetsForEachw2InWorksheetsw2.UnprotectPWord1Nextw2ExitDo'Bypassallfor...nextsEndIfNext:Next:Next:Next:Next:NextNext:Next:Next:Next:Next:NextLoopUntilTrueOnErrorGoTo0EndIfEndWithNextw1EndIfMsgBoxALLCLEAR&AUTHORS&VERSION&REPBACK&ZHENGLI,vbInformation,HEADEREndSub。

解除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文件密码的设置有2种,一种是写保护,另外一种是打开保护。

对应不同的保护措施,应该用不同的解密方法。

一:这是写保护的破解:方法: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。

关于Excel使用VBA 宏的密码破解方法和思路

关于Excel使用VBA 宏的密码破解方法和思路

对于那种试用的含有VBA宏的Excel 是最好破的。

这样的Excel 文件一般加载了dll文件,一打开就提示输入密码,然后还提示你只能使用多少次。

有次数限制当然不爽了,呵呵,所以必须破解。

首先用Advanced Office Password Recovery 打开文件,马上就会破解出通用密码,然后点击删除VBA密码,然后拷贝工作薄密码。

打开Excel 文件,撤销工作薄保护,粘贴你刚才复制的密码。

继续看每个表有保护没,有的话全部撤销。

每个工作表的密码在刚才的软件界面上都有。

然后打开VBA编辑器,提示输入密码,不管它,因为密码已经删除了,所以点击确定就可以进去了。

展开工程,删除里面用户保护的VBA代码,保存,关闭。

再打开Excel 时你就会发现已经不会提示输入任何密码了,破解完成。

对于不提供试用,只提供输入密码才能访问,而且一打开就全屏的提示输入密码。

这样的Excel 破解起来稍微要麻烦一点,不过还是能破。

具体方法有空了再写。

就按照刚刚破解的一个VBA加密的Excel 写一下破解思路,仅供参考。

打开Excel 只看到一个表,然后马上出现全屏运行的密码输入窗口。

看来该加密方式是利用的这个表写的VBA代码。

只有输入正确密码才能登陆,如果点取消,则Excel 就马上关闭了。

在全屏的界面按下ALT+F 调出菜单栏,一直按右键,到“工具”菜单,选择“保护”,继续选择“撤销工作薄保护”,然后输入上面用软件破解出来的工作薄保护密码,然后确定。

如果没有出现密码错误对话框,就说明密码正确了。

然后按CTRL+S保存,等保存完毕,再回到那个登陆窗口,点击取消。

此时你就会发现Excel 没有关闭,而是绕过用户密码登陆直接进入了,里面就是你想要看到的Excel 表。

此时不要关闭Excel ,不然待会又要求输入登陆密码。

进入“工具”-“宏”-“Visual Basic 编辑器”,双击VBAProjiect,会提示输入密码,因为在前面已经用软件删除了VBA密码,所以直接点确定就可以进入。

EXCEL忘记密码怎么办?EXCEL工作表怎么清除密码

EXCEL忘记密码怎么办?EXCEL工作表怎么清除密码

如何破解EXCEL工作表保护密码1.工具---宏----录制新宏---输入名字如:hh2. 3停止录制(这样得到一个空宏)?3. 4工具---宏----宏,选hh,点编辑按钮?选择“个人宏工作簿”后按确定,弹出如下“暂停”按钮,点击停止:1.点击“运行”按钮后,弹出“宏”对话框,2.? ? ?点击运行“PERSONAL.XLS!工作保护密码破解”这个宏3.99、运行“PERSONAL.XLS!工作保护密码破解”这个宏后,? ? ?如下图示意就可以解除工作表的密码保护了4.10(这个图,如果工作表中有多组不同密码,? ?每解开一组,就会提示一次,也就说可能会出现几次)5.11工作表保护密码破解(代码)=========请复制以下内容=============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 IntegerDim PWord1 As StringDim ShTag As Boolean, WinTag As BooleanApplication.ScreenUpdating = FalseWinTag = .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 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 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 .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 & ZHENGLI, vbInfo rmation, HEADEREnd Sub。

excel宏密码破解方法

excel宏密码破解方法

excel宏密码破解方法一、Excel“工程不可查看”两种实现方法及破解关于Excel宏编程中,要用到一些技巧,如破解Excel宏加密。

二、今天我对一个Excel宏编程中进行日期限制进行了破解。

三、方法一(共用级锁定)四、1、先对excel档进行一般的vbaproject”工程密码保护。

五、2、打开要保护的档,选择∶工具--->保护--->保护并共用活页簿--->以追踪修订方式共用-->输入密码-->保存档。

完成後,当你打开“vbaproject”工程属性时,就将会提示∶“工程不可看!”六、方法二(推荐,破坏型锁定)七、用16进制编辑工具,如winhex、ultraedit-32(可到此下载)等,再历害点的人完全可以用debug命令来做......用以上软体打开excel档,查找定位以下地方∶八、id="{00000000-0000-0000-0000-000000000000}" 注∶实际显示不会全部为0九、此时,你只要将其中的位元组随便修改一下即可。

保存再打开,就会发现大功告成!十、当然,在修改前最好做好你的文档备份。

至於恢复只要将改动过的地方还原即可(只要你记住了呵呵)。

十一、破解方面,有网友说将CMG=,DPB=和GC=后的"="替换为"."也可以的,我已测试过的确可以,这样更省事点。

用16进制编辑工具,如winhex、ultraedit-32打开X.xls文件,查找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 = Application.GetOpenFilename("Excel文件(*.xls & *.xla & *.xlt),*.xls;*.xla;*.xlt", , "VBA破解") 二十二、If Dir(Filename) = "" Then二十三、MsgBox "没找到相关文件,清重新设置。

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工作表怎么清除密码

E X C E L忘记密码怎么办E X C E L工作表怎么清除密码集团标准化办公室:[VV986T-J682P28-JP266L8-68PNN]如何破解EXCEL工作表保护密码1.工具---宏----录制新宏---输入名字如:hh2. 3停止录制(这样得到一个空宏)3. 4工具---宏----宏,选hh,点编辑按钮选择“个人宏工作簿”后按确定,弹出如下“暂停”按钮,点击停止:1.点击“运行”按钮后,弹出“宏”对话框,2.点击运行“!工作保护密码破解”这个宏3.99、运行“!工作保护密码破解”这个宏后,如下图示意就可以解除工作表的密码保护了4.10(这个图,如果工作表中有多组不同密码,每解开一组,就会提示一次,也就说可能会出现几次)5.11工作表保护密码破解(代码)=========请复制以下内容=============Public Sub 工作表保护密码破解()Const DBLSPACE As String = vbNewLine & vbNewLine Const AUTHORS As String = DBLSPACE & vbNewLine & _ "作者:McCormick JE McGimpsey "Const HEADER As String = "工作表保护密码破解"Const VERSION As String = DBLSPACE & "版本 Version " 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 IntegerDim PWord1 As StringDim ShTag As Boolean, WinTag As Boolean= FalseWith ActiveWorkbookWinTag = .ProtectStructure Or .ProtectWindowsEnd WithShTag = FalseFor Each w1 In WorksheetsShTag = ShTag OrNext w1If Not ShTag And Not WinTag ThenMsgBox MSGNOPWORDS1, vbInformation, HEADERExit SubEnd 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 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 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 (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 PWord1PWord1Next w1On Error GoTo 0ShTag = FalseFor Each w1 In Worksheets'Checks for all clear ShTag triggered to 1 if not. ShTag = ShTag OrNext 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 (MSGPWORDFOUND2, _"$$", PWord1), vbInformation, HEADER'leverage finding Pword by trying on other sheetsFor Each w2 In WorksheetsPWord1Next 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, vbInfo rmation, HEADEREnd Sub。

EXCEL中工作表保护密码解除

EXCEL中工作表保护密码解除

我这个方法只是对EXCEL中工作表保护密码解除有效,利用宏的方法就可以做到。

1、首先新建一个新的工作溥。

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

下面是这个宏的代码:Option ExplicitPublic Sub AllInternalPasswords()' Breaks worksheet and workbook structur e passwords. Bob McCormick' probably originator of base code algorit hm modified for coverage' of workbook structure / windows passw ords and for multiple passwords'' Norman Harker and JE McGimpsey 27-Dec-2002 (Version 1.1)' Modified 2003-Apr-04 by JEM: All ms gs to constants, and' eliminate one Exit Sub (Version 1.1.1) ' Reveals hashed passwords NOT original passwordsConst DBLSPACE As String = vbNewLi ne & vbNewLineConst AUTHORS As String = DBLSPAC E & vbNewLine & _"Adapted from Bob McCormick base cod e by" & _"Norman Harker and JE McGimpsey" Const HEADER As String = "AllInternal Passwords User Message"Const VERSION As String = DBLSPAC E & "Version 1.1.1 2003-Apr-04"Const REPBACK As String = DBLSPAC E & "Please report failure " & _"to the microsoft.public.excel.programming newsgroup."Const ALLCLEAR As String = DBLSPA CE & "The workbook should " & _ "now be free of all password protection, so make sure you:" & _DBLSPACE & "SAVE IT NOW!" & DB LSPACE & "and also" & _DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _DBLSPACE & "Also, remember that the password was " & _"put there for a reason. Don't stuff up cr ucial formulas " & _"or data." & DBLSPACE & "Access and use of some data " & _"may be an offense. If in doubt, don't." Const MSGNOPWORDS1 As String = "T here were no passwords on " & _ "sheets, or workbook structure or window s." & AUTHORS & VERSIONConst MSGNOPWORDS2 As String = "T here was no protection to " & _ "workbook structure or windows." & DB LSPACE & _"Proceeding to unprotect sheets." & AUT HORS & VERSIONConst MSGTAKETIME As String = "Aft er pressing OK button this " & _"will take some time." & DBLSPACE & "Amount of time " & _"depends on how many different passwor ds, the " & _"passwords, and your computer's specificat ion." & 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: " & DBLSPA CE & "$$" & 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 p assword found was: " & _DBLSPACE & "$$" & DBLSPACE & " Note it down for potential " & _ "future use in other workbooks by same person who " & _"set this password." & DBLSPACE & "N ow to check and clear " & _"other passwords." & AUTHORS & VER SIONConst MSGONLYONE As String = "Onl y structure / windows " & _ "protected with the password that was jus t found." & _ALLCLEAR & AUTHORS & VERSION & REPBACKDim w1 As Worksheet, w2 As Workshee tDim i As Integer, j As Integer, k As Int eger, 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 Boo leanApplication.ScreenUpdating = FalseWith ActiveWorkbookWinTag = .ProtectStructure Or .ProtectWi ndowsEnd WithShTag = FalseFor Each w1 In WorksheetsShTag = ShTag Or w1.ProtectContents Next w1If Not ShTag And Not WinTag Then MsgBox MSGNOPWORDS1, vbInformatio n, HEADERExit SubEnd IfMsgBox MSGTAKETIME, vbInformation, HEADERIf Not WinTag ThenMsgBox MSGNOPWORDS2, vbInformatio n, HEADERElseOn Error Resume NextDo 'dummy do loopFor i = 65 To 66: For j = 65 To 66: F or 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(MSGPWOR DFOUND1, _"$$", PWord1), vbInformation, HEADER Exit Do 'Bypass all for...nextsEnd IfEnd WithNext: Next: Next: Next: Next: Next Next: Next: Next: Next: Next: Next Loop Until TrueOn Error GoTo 0End IfIf WinTag And Not ShTag Then MsgBox 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.ProtectContents Next w1If ShTag ThenFor Each w1 In WorksheetsWith w1If .ProtectContents ThenOn Error Resume NextDo 'Dummy do loopFor i = 65 To 66: For j = 65 To 66: F or 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(MSGPWOR DFOUND2, _"$$", PWord1), vbInformation, HEADER'leverage finding Pword by trying on othe r sheetsFor Each w2 In Worksheetsw2.Unprotect PWord1Next w2Exit Do 'Bypass all for...nextsEnd IfNext: Next: Next: Next: Next: Next Next: Next: Next: Next: Next: Next Loop Until TrueOn Error GoTo 0End IfEnd WithNext w1End IfMsgBox ALLCLEAR & AUTHORS & V ERSION & REPBACK, vbInformation, H EADEREnd Sub。

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 & 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 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 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、WORD文档密码摘要:本文讨论了如何使用VB编程,通过穷举法解除EXCEL文档和WORD文档的密码。

Excel用VBA去除工作表保护密码

Excel用VBA去除工作表保护密码

Excel用VBA去除工作表保护密码Excel 的工作表保护是非常脆弱的。

下面的VBA代码虽然不能找出工作表保护密码,但可以取消工作表保护,如果自己的工作表保护密码忘记了,可以用这个方法:1.按Alt+F11,打开VBA编辑器。

2.在“工程”窗口中选择要取消保护的工作表名称,单击菜单“插入→模块”。

3.在右侧的代码窗口中输入下列代码:Sub Remove_WorkSheet_Password()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 NextIf ActiveSheet.ProtectContents = False ThenMsgBox "该工作表没有保护密码!"Exit SubEnd IfFor 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 "已经解除了工作表保护!"Exit SubEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextEnd Sub4.关闭VBA编辑器,回到工作表中,按Alt+F8,打开“宏”对话框,选择“Remove_WorkSheet_Password”,并单击“执行”按钮。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
ALLCLEAR & AUTHORS & VERSION & REPBACK
Dim w1 As Worksheet, w2 As Worksheet
Dim 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
"workbook structure or windows." & DBLSPACE & _
"Proceeding to unprotect sheets." & AUTHORS & VERSION
Const MSGTAKETIME As String = "After pressing OK button this " & _
Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
If .ProtectStructure = False And _
.ProtectWindows = False Then
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 " & _
' 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
"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 & _
6\关闭编辑窗口
7\工具---宏-----宏,选AllInternalPasswords,运行,确定两次,等2分钟,再确定.OK,没有密码了!!
宏内容如下:
Public Sub AllInternalPasswords()
' Breaks worksheet and workbook structure passwords. Bob McCormick
Next w1
If Not ShTag And Not WinTag Then
MsgBox MSGNOPWORDS1, vbInformation, HEADER
Exit Sub
End If
MsgBox MSGTAKETIME, vbInformation, HEADER
If Not WinTag Then
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 " & _
For Each w1 In Worksheets
'Attempt clearance with PWord1
w1.Unprotect PWord1
利用宏运行方式破解,真的很有效,运行中可能电脑会有两分钟无反应,千萬不要以为死机了哦,等等吧!
步骤方法如下:
1\打开文件
2\工具---宏----录制新宏---输入名字如:aa
3\停止录制(这样得到一个空宏)
4\工具---宏----宏,选aa,点编辑按钮
5\删除窗口中的所有字符(只有几个),替换为下面的内容:(复制吧)
With ActiveWorkbook
WinTag = .ProtectStructure Or .ProtectWindows
End With
ShTag = False
For Each w1 In Worksheets
ShTag = ShTag Or w1.ProtectContents
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 Application.Substitute(MSGPWORDFOUND1, _
"other passwords." & AUTHORS & VERSION
Const MSGONLYONE As String = "Only structure / windows " & _
"protected with the password that was just found." & _
"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."
MsgBox MSGNOPWORDS2, vbInformation, HEADER
Else
On Error Resume Next
Do 'dummy do loop
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
"$$", PWord1), vbInformation, HEADER
Exit Do 'Bypass all for...nexts
End If
End With
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
"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 & _
Const DBLSPACE As String = vbNewLine & vbNewLine
Const AUTHORS As String = DBLSPACE & vbNewLine & _
"Adapted from Bob McCormick base code by" & _
"Norman Harker and JE McGimpsey"
DBLSPACE & "SAVE IT NOW!" & DBLSPACE & "and also" & _
DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _
DBLSPACE & "Also, remember that the password was " & _
相关文档
最新文档