首页 科普 资讯 养生 问答 找医院 相关问答
首页> 问答

**高分求高手编个excel 宏代码**

发布网友 发布时间:3小时前

我来回答

1个回答

热心网友 时间:3小时前

Excel工作表保护密码破解
超级无敌有用!!!
方法:
1\打开文件
2\工具---宏----录制新宏---输入名字如:aa
3\停止录制(这样得到一个空宏)
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 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 '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
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
导出android程序,弄成.apk安装包内为什么不含在虚拟机上创建的... 不包括是什么意思? 油炸三角果子的做法 金庸小说前“五绝”和后“五绝”谁更胜一筹 金庸小说中前五绝和后五绝对打哪边更厉害? 我的离开也是爱。mv女主角是谁 离开伤心的地方韩小薰演唱歌曲 ...年11月14日答案介绍-支付宝蚂蚁庄园2022年11月14日第一题答案是什 ... 水冷散热器接主板cpu-opt和aio-pump有什么区别和作用吗? aio pump接口和cpu opt接口有何不同呢 红薯能不能配西兰花一起炒 高血压的十大禁忌是什么? 电脑开机出现英文不懂 海尔空调万能遥控器代码有哪些? 甲醇属于什么醇 甲醇什么结构 防静电手腕带简介 QQ管家的金币换礼品是骗人的吧,让输入验证码的时候礼品已经没了._百 ... 安全金币换礼包是真的嘛 电脑管家礼包是骗局? 管家里面用金币兑换实物,为什么我每次兑换都提示已兑换 电脑管家金币兑换礼包是正的吗? 中译英: 这件衬衫和你的裤子很配 我母亲今年79岁,九月份身体不适,B超和肝功检查,结果怀疑是有东西占位... 半永久眉毛二次补色后需要买修复剂吗 左边一个革,右边一个斥去掉点是什么字 ...弃邪的急,王欲舍所携人的舍,以此定华、王之优劣的定的解释 ...中‘‘世以此定华王之优劣’’中的以是什么意思 太康道情《王金豆还粮》 365天对应365种花,快看自己的生日,你属于哪种? 真的有属于自己的生日花吗 ...两个女朋友是什么体验?累不累两个都很爱吗?还是爱一个会比较多?_百... 有人问我交了几个女朋友,我是老实说还是一个不说,还是只说几个。 现代悦动机油加的过多会出现什么情况现代悦动机油加多了怎么放? 合唱队男生是女生的六分之五,后来来了十二名男生现在男生与女生的比是... 合唱队员有男生占合唱队的3/1,又来6名男身参加,这是男生占合唱队的9/... 合唱队男生是女生的5分之3,女生比男生多10人,合唱队一共有几人 ...队男生人数原来占3分之1,后来又有5名男生加入,这样男生人数就占合... ...名女生后,男生人数是女生的八分之三.学校合唱团有男生多少人_百度知 ... 合唱队的人数是女生人数的五分之三,如果男生增加五人,女生减少三人,男女... 2006世界杯4强 ...怎样查看安卓版QQ邮箱文件,文件名是什么? 没 ...每次巨大的砰的一声,都快把我吓出心脏病了。怎么解决这个问题... ...该怎么说,还有选什么时间段是开房能住的更久一点,时间是怎么算的,求... 人工智能应用最为广泛的领域 机器人研发属于什么行业 生物竞赛 2003年全国生物联赛 61 6月份出生属虎取名宜忌 2022年男孩女孩名字最火 虎宝宝取名禁忌属虎宝宝的起名禁忌有哪些 如们打开笔记本电脑wfiv开关 ...感觉胃不舒服,经常觉得饿?检查甲状腺正常。大便有点浠溏。很容易... 最近没有食欲,饿的感觉不明显,大便也没以前有规律.早上肚子感觉有点饱... ...不舒服,吃点就会舒服一点,过一两个小时又会感觉饿 空洞骑士叛徒领主在哪介绍_空洞骑士叛徒领主在哪是什么 性情中人蒋经国图书信息 蒋经国的谋士王升内容简介 蒋经国全纪录图书信息 补充医疗保险是商业险吗? ...长痘痘已经两年了,想听听专家的意见,我该怎么治疗 山西省太钢技校好不好 假发怎么带不会掉? 外阴白斑不治会有什么后果 外阴白斑不治能自己好吗 外阴白斑不治会怎样 地下城叹息之塔有什么奖励 dnf叹息之塔什么时间开放? dnf叹息之塔开放后绝望之塔还有吗 我的诺基亚xl4g手机支持32g内存卡,我安装了16g的,各种软件怎么存不进... 诺基亚xl入门手机视频怎么老卡 身份证上的字在办银行卡时错了一个字,现在办卡算重号吗 高分有请高手帮我设置一个EXCEL公式,以减轻工作人员录入工作量。_百度... excel问题,帮我解决了高分回报! 四红汤的做法有哪些? 如何建立创新型组织 虐新文名词解释 韩国中国大实官电话号是多少 什么叫合双数呢? 请问有合双数02,04,06,08吗? 计算机行业找工作有35岁的年龄限制,请问系统分析师与架构师找工作也有... 丹阳界牌至泰兴靖江堵车吗? 中秋节长江大桥限号吗 马来西亚拆分理财GTC安全吗? 广西成人自考是线上考试还是线下考试? 请介绍你认为朱镇模 拍过的最好的两部电影 朱镇模演的电影那些比较好看?拜托了各位 谢谢 求推荐感人韩国爱情电影,比较经典的都看过了。 朱镇模获奖荣耀 19款凌渡【走颠簸的路段地盘会发出异响】? ...道馆钥匙如何得?如何过那个废弃小屋得到钥匙?最好有图跟路线_百度知... ...大概要打2000分钟电话,3000条短信,我买什么卡划算或者包什么套餐...
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com