位置:首页游戏数码>如何破解EXCEL工作表保护密码忘记密码怎么办 如何破解excel工作表保护忘记密码

如何破解EXCEL工作表保护密码忘记密码怎么办 如何破解excel工作表保护忘记密码

所属分类:游戏数码 发布时间:2025/8/23 13:54:51

EXCEL工作表保护密码忘记密码怎么办,快速学起来

操作方法

01

新建一个EXCEL工作表,而后点击另存为,讲表格保存为启用宏的工作表

02

一次点击开发工具---录制新宏,在弹出的对话框内修改宏名称而后确定

03

依次点击开发工具----停止录制宏,宏录制完成

04

依次点击开发工具,---宏----在弹出的对话框找到我们刚才录制的宏名称而后进入VBA界面

05

在VBA界面,全选里面的代码,而后删除,讲里面的代码全部删除完

06

代码复制到VBA编辑窗口内

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

点击保存

07

点击开发工具,宏,找到我们刚才录制的宏,点击执行宏

08

而后,在弹出的所有对话框上,都点击确定,都确定,1分钟后,就可以编辑了

特别提示

本方法仅适用于2007-2016版本

推荐信息

  • 电脑屏幕横过来了怎么办 电脑屏幕横过来怎么办

    游戏数码时间:2025/8/22 8:11:03

    有时候电脑显示屏不知怎么回事就“横”过来了,看着极为别扭,该怎么把它调回来呢?方法也简单,一起来看看吧。win10系统:01按一下“开始”,然后选择“设置”,点击进入。02接着我们要选择“系统”,因为显示

  • 如何用Ps将白底照片换成蓝底照片 如何用ps将白底照片变成透明

    游戏数码时间:2025/8/24 4:46:23

    有时需要用到证件照片,但需要蓝底照片的时候,恰巧没有,有没有什么办法用ps把白底照片换成蓝底呢?接下来教你!操作方法01打开一张一寸照片,【Ctrl+J】复制一层02选择【图像】-【调整】-【替换颜色】,吸取背景的红色,点击确定;调节容差值到合适位置,然后再进行细节处理03下方颜色替换为蓝色(0,0

  • 光盘怎么复制到u盘 光盘怎么复制到优盘里

    游戏数码时间:2025/8/21 5:55:15

    光盘现在使用的比较少,但是如果光盘里面有重要的东西的话,还是把它复制到优盘比较安全,但是光盘怎么复制到优盘呢?操作方法01首先如果你的电脑要有光盘驱动,如果没有可以去电脑店安装。放入光盘,插好优盘,让电脑进行读取。02点击桌面的“此电脑”(或者计算机、我的电脑),进入电脑的内

  • 乐视电视怎么投屏,最新方法 乐视电视怎么投屏电影

    游戏数码时间:2025/8/16 21:37:10

    电视连网投屏观看视频是很方便的,很多对乐视电视不熟悉的小伙伴可能会不清楚怎么投屏,因此下面就一起来看看乐视电视投屏的方法吧。工具/材料手机电脑WiFi乐播投屏操作方法01方法1:打开乐视电视,进入自带的应用商店。在工具分类中找到投屏软件乐播投屏。点击下载软件。或者直接搜索首字母“LBTP

  • Excel隔行求和,用快捷键轻松搞定 excel隔行求总和

    游戏数码时间:2025/8/22 14:39:36

    在工作中Excel表格的简单求和运算你还在使用Excel函数求和吗?教你使用快捷键,轻松搞定隔行求和哦~操作方法01下图是我们要求和的单元格,像这种隔行求和要如何实现呢?简单的快捷键就能快速的计算出结果啦。02操作步骤:首先使用Ctrl+A选中单元格,在使用F5按键打开【定位】页面,点击【定位条件】

  • 华硕笔记本开机出现Aptio Setup Utility-COpyr 华硕笔记本开机出现an operating

    游戏数码时间:2025/8/23 16:37:11

    在用华硕笔记本下载视频,没有观察到没电,突然间关机,再重启时,就出现了:Aptio Setup Utility-COpyright(c)2014Am,而且一直都是反复如此,就是进入不了windows 界面。该怎么解决呢?工具/材料电脑BIOS操作方法01可尝试在BIOS界面中点击F9键--回车键--

  • 怎么破解QQ空间权限 怎么破解qq空间权限手机

    游戏数码时间:2025/8/20 13:55:43

    本指南并非采用非法手段破解,而是通过官方的隐藏设置打开与对方通话的权限,如果你不是对方好友,对方也拒绝加好友,那么怎么跟别人进行对话呢,前提是他必须要来过你的QQ空间,能够看到访问记录、操作方法01打开自己的手机QQ空间,找到最近访客02找到一个设置过空间权限的人,点击右上角的那几个点,可以赠送他礼

  • Word好玩的技巧,一起来涨知识 word实用小技巧集锦

    游戏数码时间:2025/8/24 5:09:48

    今天给大家分享几个Word好玩的技巧,可能部分朋友比较少用到,但是我们可以学习涨知识~操作方法01折叠内容在文档中如果我们想要将部分内容折叠起来,只显示标题怎么做呢?先选中标题,点击设置样式,选择其中一个标题样式。接着选中全部内容,右击选择【展开/折叠】,选择【折叠标题】即可。02符号生成下划线在W

  • 电脑总是自动重复按键盘上的一个键 电脑总是自动重复按键怎么解决

    游戏数码时间:2025/8/21 20:44:16

    电脑开机打字的时候,有时候会遇到,重复的自动打同一个字或者字母,根本停不下来的情况,这种情况持续了好多天,要怎么解决呢?工具/材料腾讯电脑管家检查键盘内部按键01出现这种情况,很可能是卡键引起的,我的其实就是卡键,是键盘里面的硅胶垫给卡住了,我们可以拿一个细点的小一字改锥撬动键盘按键02撬动之后,如

  • Word表格函数公式,轻松搞定加减乘除 word表格函数公式计算

    游戏数码时间:2025/8/16 21:37:13

    在Word表格中的数据应该如何计算呢?不少伙伴表示疑惑,不知道如何去计算,下面教大家使用公式,轻松搞定加减乘除运算~Word函数计算公式,先记住这三个函数:求和函数SUM求积函数PRODUCT求平均值函数AVERAGE操作方法01Word表格求和在Word表格中求和,直接点击【布局】-【数据】-【公