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、冰箱门无法紧闭造成漏水 2、…

    2022-09-24
  • 一箱啤酒有几瓶_一箱啤酒多少瓶

    如果一箱啤酒用玻璃瓶装,有12瓶,罐装啤酒是24瓶。如果是小塑料盒的话,玻璃盒里有9瓶啤酒,罐头里有6瓶。不同规格的啤酒有不同的包装数量。常见的啤酒容量有330ml、500ml、5…

    2022-08-05
  • 在电脑上同时选中多个文件(怎么在电脑上同时选择多个文件)

    以下方法仅适用于同一级目录下有多个文件的情况。所谓兄弟目录,简单来说就是当你打开一个文件夹,你看到的所有文件(包括文件夹)都叫做兄弟目录。比如双击打开E盘,那么E盘下的所有文件都在…

    2022-04-22
  • 吃石榴的好处_吃石榴的禁忌

    石榴藏着6大健康好处 今天小编介绍石榴也有禁忌和石榴藏着6大健康好处的生活小经验,希望能帮到网友们! 最近又到了吃石榴的季节,相信很多小伙伴们已经在水果店里面看到又鲜又大的石榴了吧…

    2022-08-14
  • 竹地板的优点是什么,十大竹地板品牌

    随着木地板渐渐的走入千家万户的家庭,也受到人们的认可。所以木地板行业的市场也越来越大,种类也越来越度多。近几年比较火热的就有竹地板。关于竹地板的优缺点今天小编就给大家总结一下。方便…

    2023-10-06
  • 如何快速记单词_快速记单词的方法

    记忆是一种复杂的心理活动,利用因果关系、联想和想象等方式可以帮助促进记忆。以下是一些使用句子记忆单词的方法,希望能对你有所帮助: 1. 关联词句子法:利用单词与其他词之间的关联关系…

    2023-03-23
  • 天麻的功效,天麻的用法

    天麻的功效用法 1、性味:甘,平。 ①《本经》:味辛,温。 ②《药性论》:无毒。味甘,平。 ③《医学启源》:气平,味苦。 2、归经:入肝经。 ①《纲目》:入肝经气分。 ②《雷公炮制…

    2023-11-07
  • 辽宁二本最低分的大学有哪些_辽宁二本最低分的大学

    2022年高考辽宁省内本科院校 在本省投档最低分数线汇总

    2022-11-28
  • 如何将excel打印时放大(excel表格如何放大打印出来)

    excel怎么在打印时放大打印? 1、我们制作好了一张表格,在打印的时候发现,它只占据了纸张的一小部分,打印出来很不美观 2、点击excel左上角的打印按钮 3、弹出打印设置对话框…

    2022-04-03
  • 有哪些存钱的方法,生活中能存下钱的6个习惯

    很多朋友觉得存钱是一件比较困难的事情,因为他们手上有钱都会想着花出去,不会想着存下来,毕竟存钱存着存着手上没钱了还是要挪出来花的,但是我们在遇到一些紧急事情的时候有存款总比没存款好…

    2023-10-20

发表回复

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