excel密码保护忘记了怎么办(excel表格保护密码忘记)

excel密码破解步骤如下:

打开受密码保护的工作表

excel密码保护忘记了怎么办(excel表格保护密码忘记)

工具—宏—-录制新宏—输入名字如:hh

excel密码保护忘记了怎么办(excel表格保护密码忘记)

停止录制(这样得到一个空宏)

excel密码保护忘记了怎么办(excel表格保护密码忘记)

工具—宏—-宏,选hh,点编辑按钮

excel密码保护忘记了怎么办(excel表格保护密码忘记)

删除窗口中的所有字符,替换为下面的内容:

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

关闭编辑窗口 ,工具—宏—–运行,等1分钟,再确定.OK,没有密码了

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 86345@qq.com 举报,一经查实,本站将立刻删除。
(0)
上一篇 2022-04-04 07:20:02
下一篇 2022-04-04 07:20:32

猜你喜欢

  • miui11怎么查看电池寿命(MIUI12.5怎么查看电池寿命)

    MIUI13是小米最新的手机系统,拥有最流畅的手机体验。很多小米手机用户更喜欢更新全新的系统,想研究一个最抢眼的功能来检查手机的寿命。很多用户想知道MIUI 13是怎么检查续航的?…

    2022-05-12
  • 空腹睡觉对身体好吗,空腹睡觉有哪些危害

    空腹睡觉对身体好吗 空腹睡觉对身体不好。 一日三餐,早上的时候需要摄入足够的营养物质,所以早餐应该吃得精致,才能满足体的需求。而中午的时候需要吃饱,因为午后有很长一段时间需要度过,…

    2023-10-12
  • 板材的工艺流程是什么,板材的工艺要点

    板式家具的生产工艺比实木家具复杂得多,设备昂贵,普通小企业无法满足生产要求(当然,也有一些小工厂,用简单的方法和粗糙的设备生产布局家具,用E3板或劣质板和软漆生产板式家具,价格便宜…

    2023-10-29
  • 拖把头怎么换下来_拖把的选择与保养

    拖把在洗涤时也要注意,任何材质的拖把都要用中性洗涤剂清洗。作为清洁工具自身要清洁,最好再放点消毒水消毒。 拖把头怎么换?拖把的选择与保养 拖把头怎么换 拖把有好几种,基本都是拖把头…

    2023-06-23
  • 减肥怎么吃_减肥才知道的事

    减肥后才知道的事 1、蜂蜜水就是糖水,喝了并不能减肥 2、空腹可以吃香蕉,吃香蕉不能减肥 3、肉汤里脂肪含量很高喝多了容易发胖喝汤还不如直接吃肉 4、易胖水果榴莲、菠萝蜜、葡萄、荔…

    2022-11-17
  • 五桠果有什么功效,五桠果的功效

    五桠果 别名西湿阿地[僾尼] 来源五桠果科(锡叶藤科)五桠果Dillenia indica L.,以根、树皮入药。 生境分部云南。 性味酸、涩,平。 功能主治收敛,解毒。主治疟疾。…

    2023-10-03
  • 大料又叫八角_自贡大料粉

    自贡大料是产于四川自贡的一种四川大料,属于木兰科香蕉树的一个变种假枫树皮。它的叶子和果实与普通八角非常相似,一般生长在四川和湖北。四川八角喜冬暖夏凉的山地气候,在干燥贫瘠的低洼地带…

    2022-08-08
  • 封闭式阳台能养绣球花吗_封闭式阳台算不算建筑面积

    封闭式阳台其实就是正常的平面阳台,这种情况肯定是算了建筑面积的,不然开发商是不会免费送你一个阳台的。那么,封闭式阳台墙面要不要贴瓷砖?一起来看看小编带来的详细介绍吧! 封闭式阳台算…

    2023-03-25
  • 中国情人节有几个?中国情人节有哪几个?

    中国情人节,又称七夕节,是一个浪漫而古老的节日。它的起源可以追溯到两千多年前的中国古代传说。在这个特殊的日子里,人们相信牛郎织女会在银河上相会,所以也被称为“牛郎织女节”。 第一个…

    2024-01-02
  • 减肥怎么吃一日三餐,一日三餐减肥食谱推荐

    想要减肥,一定要控制饮食,减脂餐是为了减肥而诞生的一种餐食,其目的是为了控制卡路里摄入,在保持身体健康的前提下,达到减肥的目的。 但是,很多人误以为减脂餐就是节食,于是戒掉了各种健…

    2023-07-27

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注