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

猜你喜欢

  • 唱歌怎么用气声唱_如何唱歌用气

    气声唱法是一种气与声不按发声规律组合的方式,现在我们越来越流行这种用气声唱歌的方法了,那么在唱歌的时候应该怎样用气发声呢,下面是学习啦小编为大家整理一些方法吧! 怎样演唱气声的方法…

    2022-07-24
  • 安全带怎么调_安全带的正确使用方法

    1 首先调好座椅位置 2 调节安全带位置(适用于大部分车型), 3 佩戴安全带:正确佩戴安全带时,肩带应该跨过胸腔,腰带应该紧贴髋骨。 4 扣上安全带后,卡扣会发出“啪”的一声,但…

    2022-10-06
  • toyo空调是什么牌子_TOYO空调贵吗

    走进粤桂智能家电产业园,可以看到一幅巨大的广告牌上写着这样一段话:致力于打造智能家居产业聚集区,柳州津晶电器就坐落在这里,而这里也仅仅是津晶企业集团在全国五大制造基地之一。 柳州津…

    2023-03-11
  • 晕车怎么办_缓解晕车最有效的方法

    1.看远处的风景 窗外的风景能让大脑确定平衡系统的信号,确定身体在移动,帮助身体解决晕车造成的不平衡,尽量不要让眼睛固定在同一个地方活动。 在选择坐车的时候,不要空胃去坐车,也不要…

    2022-07-05
  • excel函数提取姓(excel如何把姓提取出来)

    Excel函数共有11大类,分别是数据库函数、日期和时间函数、工程函数、财务函数、信息函数、逻辑函数、查询和引用函数、数学和三角函数、统计函数、文本函数和用户自定义函数。对于很多人…

    2022-04-05
  • 尖叫是电解质饮料吗,它的主要功能是什么

    尖叫饮料以前小时候经常买来喝,直到现在也会偶尔会买,那么,你喜欢喝这款尖叫饮料吗? 尖叫饮料——纤维型 农夫尖叫(纤维饮料)属于全新功能型饮料。与其他品牌饮料补充维生素、矿物质有所…

    2023-10-18
  • 小千代表着多少?小的数字范围是哪些?

    平安扣 我们去到翡翠市场就会发现一个问题,在谈及价格时常常会从商家和行家口中蹦出几个词,小千,中万,或者大万等等用小,中,大形容的价格,这到底代表着什么价格呢? 翡翠 其实这些词语…

    2024-01-17
  • 七大洲四大洋都有哪些,快速记忆七大洲四大洋分布图的方法

    七大洲四大洋都有哪些 七大洲:分别是亚洲(Asia)、欧洲(Europe)、北美洲(North America)、南美洲(South America)非洲(Africa)、大洋洲(…

    2023-09-25
  • 怎么在电视上看电脑的电影(怎么用电脑连接电视看电影)

    电脑连接网络电视看电影的设置方法; 1、把数据线(VGA或HDMI)一头插到笔记本或台式电脑一头插到电视机的相应接口上。 2、笔记本或台式电脑的通电并开机,电视通电并开机。 3、用…

    投稿 2022-04-23
  • 办公自动化软件有哪些,办公自动化软件有哪些类型

    办公自动化是指任何一种技术或软件,可以使办公或工作相关的流程更高效、更省时。它涵盖范围广泛的产品和服务,从数据存储和访问控制到薪资处理、办公楼维护等等。 安装设备以使你的办公环境自…

    2023-08-03

发表回复

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