首页

文章

excel 2007表格密码忘记了怎么破解,谢谢

发布网友 发布时间:2022-03-04 01:38

我来回答

1个回答

热心网友 时间:2022-03-04 03:24

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 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 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 & VERSION
Const 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 & VERSION
Const MSGONLYONE As String = "Only structure / windows " & _
"protected with the password that was just found." & _
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
Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer
Dim PWord1 As String
Dim ShTag As Boolean, WinTag As Boolean

Application.ScreenUpdating = False
With ActiveWorkbook
WinTag = .ProtectStructure Or .ProtectWindows
End With
ShTag = False
For Each w1 In Worksheets
ShTag = ShTag Or w1.ProtectContents
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
MsgBox MSGNOPWORDS2, vbInformation, HEADER
Else
On Error Resume Next
Do 'mmy do loop
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
For i2 = 65 To 66: For 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 Then
PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _
Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
MsgBox Application.Substitute(MSGPWORDFOUND1, _
"$$", 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
Loop Until True
On Error GoTo 0
End If
If WinTag And Not ShTag Then
MsgBox MSGONLYONE, vbInformation, HEADER
Exit Sub
End If
On Error Resume Next
For Each w1 In Worksheets
'Attempt clearance with PWord1
w1.Unprotect PWord1
Next w1
On Error GoTo 0
ShTag = False
For Each w1 In Worksheets
'Checks for all clear ShTag triggered to 1 if not.
ShTag = ShTag Or w1.ProtectContents
Next w1
If ShTag Then
For Each w1 In Worksheets
With w1
If .ProtectContents Then
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
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 Then
PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _
Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
MsgBox Application.Substitute(MSGPWORDFOUND2, _
"$$", PWord1), vbInformation, HEADER
'leverage finding Pword by trying on other sheets
For Each w2 In Worksheets
w2.Unprotect PWord1
Next w2
Exit Do 'Bypass all for...nexts
End If
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
Loop Until True
On Error GoTo 0
End If
End With
Next w1
End If
MsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER
End Sub
把代码复制进宏里 运行 就解除密码了
...先讲女主的灵魂飘荡了一段时间,然后重生,请问是那本? 拯救者散热器怎么开 电脑如何一键还原系统电脑一键还原怎么操作 神舟笔记本电脑怎么重新设置神舟战神bios恢复出厂设置 神舟电脑恢复出厂设置神舟战神怎么恢复原厂系统 水泥楼梯如何铺木楼梯 家里面楼梯是水泥的不想铺地毯或者地砖还能铺什么 楼梯的水泥台阶上可以铺地板革吗 手机腾讯会议共享屏幕播放视频没声 腾讯会议共享屏幕没声音怎么办 微信寄快递怎么取消订单_取消订单方法介绍 300兆宽带用什么路由器好? 请问高分子井盖具体材料有那些?谢谢 井盖骨架有哪些材料 ...一个女主是空姐,她和男主第一次在去巴黎飞机上相遇,约定如果三次... 找一部电影 记得结局是主角上了私人飞机,然后和空姐,可能是情人... 360借条怎么开通? 脚踝系红绳是什么意思 痤疮 痘痘 黑头 粉刺必看的终结绿色治疗 女性脸上有痤疮不能吃皮蛋吗 前事不忘,__ 只可意会,___ 皮之不存,__ __,不为瓦全,__ __,不见泰山... 薪酬:以薪酬战略撬动企业变革内容简介 领先型薪酬策略在实践中的应用 领先型薪酬策略什么是领先型薪酬策略 什么是领先型薪酬策略 第三方支付都有什么 银行用车抵押贷款 雌雄眼的女人不能惹雌雄眼的女人旺夫吗 修缮,与修理的区别 小弟想买一款索尼的笔记本。麻烦各位推荐一下。颜色必须是黑色的,键盘... SONY的笔记本电脑硬盘大概多钱一个 先说谢谢了 sony的笔记本ea38ec 到底用的是什么牌子的内存 尔必达?威刚... 在Sony Style上面买机子,除了鼠标,包,其他东西都全么? 有谁知道SONY的最新最小VGN-UX的笔记本好无好用?介绍下基本功能~!_百度... 怎样让孩子主动找老师补课? 表格列求和公式怎么设置 求和函数公式怎么输入 北京注册成立一个公司需要多少钱 北京公司都是什么 手机导航地图语音怎么下载 如何分别真金和仿金首饰 怎样区分真金和仿金首饰呢 小学生新年晚会主持人的串词!!(不要太多)急 大大后天就需要了!!!_百度... 周年晚会策划公司 奥格瑞玛传送门大厅在哪 奥格瑞玛传送门大厅怎么走 锻炼颈椎的几个动作 水多久能结冰 冰能在多长时间内形成 请问水低于0度会结冰吗? 如何防止脱发严重 嘴唇上有黑印用蜜蜡和棉线去除了胡须 急求07版excel表格设置的密码忘记怎么啊???????谁能帮帮我?????????? excel2007文档设置的密码忘记怎么解开 excel密码忘记了怎么办(office 2007) 设置的excel2007的打开密码忘记了,如何能跳过excel的密码检测这个步骤 剧本杀主要有什么? 男女剧本杀是干什么的 电脑的规格型号在哪看 怎么在本电脑上查看电脑的规格和参数 怎样调节屏幕字体大小 电脑规格型号怎么看 怎么看一台电脑中所有配置的规格和型号? 手机跟电脑直接互传文件都用什么软件 怎么看一台电脑中所有配置的规格和型号 可以手机电脑互传的软件 用什么软件可以使电脑和手机互传信息? 跪求windows2008 server r2激活工具 什么软件可以实现两台电脑之间的文件互传 两台windows10电脑怎么传软件 如何激活Windows 2008 R2 Win2008 R2有效激活方法 怎么激活windows2008 r2 Excel表格 版本:2007忘记了密码怎么办,有什么办法解开!!急急... 忘记excel2007密码怎么办啊?求助 我的excel表格设置了密码忘记了怎么办 怎么去掉word下面的红色波浪线 excel2007表格密码忘记怎么办 反正就是5-6位数字 word中字下面的波浪线怎么去掉 电脑微信空间满了怎么清理 电脑微信内存满了怎么清理 请问怎样去设置WiFi密码 怎样在手机上设置wifi密码 电脑c盘微信满了怎么清理 纯净水桶里面发黄怎样才处理干净? 怎样把QQ彼此都拉黑的人加为好友 我想把QQ一个不是好友的人加入黑名单。怎么加? 如何把QQ的黑名单的人再加为好友 手机丢啦怎么查找手机位置 笔记本电脑忘记登录密码? 抖音里的图文发布为啥不能自动保存在相册? 高中毕业,有CCNA证书,在北京找什么样的工作? 怎么才能把旧手机的联系人传到新手机上?
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com