excel忘记密码怎么办 360压缩(excel忘记密码怎么办)

1.首先,打开EXCEL,选择视图,宏,录制一个新宏,并创建一个新宏。你可以取任何你想要的名字。

excel忘记密码怎么办 360压缩(excel忘记密码怎么办)

2、先生成一个空的宏

excel忘记密码怎么办 360压缩(excel忘记密码怎么办)

3、编辑这个宏,选中刚新建的宏后点击编辑按钮

excel忘记密码怎么办 360压缩(excel忘记密码怎么办)

4、删除窗口所有字符,把下面的内容粘贴进入。一个字母、标点符号都不能少不能错。

Option Explicit

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

excel忘记密码怎么办 360压缩(excel忘记密码怎么办)

5、关闭掉编辑窗口

6、在宏里选中AllInternalPasswords这个编辑好的宏,执行,并且确定数次,就OK了。

excel忘记密码怎么办 360压缩(excel忘记密码怎么办)

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

猜你喜欢

  • 镐头是什么意思,元勋的读音

    七年级下册第一单元 第1课 邓稼先 元勋(yuán xūn):指首功;大功。亦指为建立新的国家或某朝代立大功的人。注意“勋”的读音为1声。不要读作3声。 奠基(diàn jī):给…

    2023-10-18
  • 桩基类型有哪些_桩基的三种类型

    桩基是天然地基无法满足上部结构承载力时采取的措施,基本分类有三种: 钻孔灌注桩,预先挖好钻孔,在放入钢筋骨架,最后逐步灌入混凝土,按施工方式分为人工挖孔与机械挖孔,机械挖孔时需要有…

    2022-06-23
  • 樱花吸油烟机怎么样_樱花抽油烟机质量好不好

    樱花油烟机质量怎么样? 如果厨房处于经常使用的状态,那么厨房中的油烟一定不少,这些油烟如果没有及时被排出,不仅影响厨房的空气,还会让厨房各个角落的卫生变得非常糟糕,大多数家庭在装修…

    2022-08-02
  • 强化复合地板怎么挑选,哪些品牌的地板品质靠谱

    装修时,地板无疑是一个重点的部分。在几种常见的地板中,强化复合地板以其实惠的价格、稳定的性能和省心的维护而深受大家的欢迎。 那么,强化复合地板怎么挑选?哪些品牌的地板品质靠谱可以买…

    投稿 2023-09-09
  • 为啥坐月子的宝妈爱哭_原来是这样

    在怀孕时,准妈妈就被千叮咛万嘱咐:月子期间千万不能哭,哭对眼睛不好,容易留下病根。可真到坐月子的时候,完全没哭过的宝妈一百个里也难挑出一个。 宝妈A:生完娃后就是很想哭,一点儿不开…

    2023-04-04
  • 回光返照的现象_回光返照的时间

    《红楼梦》第九十八回,林黛玉得知贾府为宝玉和宝钗定亲,痴情破灭,“唯求速死”。到了宝玉成亲那一日,病势更沉。但晚间,“却又缓过来了,微微睁开眼,似有要汤要水的光景……觉得心里似明似…

    2022-11-17
  • 黑胡桃家具怎么选_黑胡桃家具怎样选

    实木家具的价值重点体现在材质上,北美黑胡桃家具因其材质生长周期长、密度大、木质稳定、色泽纹理漂亮等优点,其售卖价格高昂,同时也是众多成功人士、收藏人士的钟爱之选。 因黑胡桃又名黑核…

    2022-09-21
  • 秋冬季节电脑保护方法(鍐ぉ鐢佃剳鎬庝箞淇濆吇)

    随着秋冬的来临,电脑的使用可能或多或少会出现一些问题。众所周知,天气炎热时,电脑需要加强散热。在寒冷干燥的秋冬季节,使用电脑也有一些注意事项。今天电脑问题网就来给大家讲一些关于秋冬…

    投稿 2022-05-09
  • 电脑操作缓慢怎么办(如何解决电脑运行速度慢)

    一、 优化开机启动项 我们的电脑从开机到进入到系统的这一段时间里,电脑会逐一开启进入系统时所需要运行的程序。这是影响着电脑开机速度快慢最关键的原因之一,因此,我们可以删除一些平常所…

    2022-04-29
  • 楼盘封顶后还有什么工作,楼盘已经封顶多久能好

    封顶之后还要进行二次施工,主要是针对结构方面。首先房屋面要做找平处理,同时还要做防水层等等,接下来就是进行室内的装修,墙面要抹灰,地面要贴瓷砖,同时还要安装门窗,把内部的水电安装到…

    2023-07-19

发表回复

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