方法:
1\打开文件
2\工具---宏----录制新宏---输入名字如:aa
3\停止录制(这样得到一个空宏)
4\工具---宏----宏,选aa,点编辑按钮
5\删除窗口中的所有字符(只有几个),替换为下面的内容:(复制吧)
6\关闭编辑窗口
7\工具---宏-----宏,选AllInternalPasswords,运行,确定两次,等2分钟,再确定.OK,没有密码了!!
内容如下:

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 撤销工作表保护相关推荐

  1. Excel撤销工作表保护方法(Excel无法调节列宽解决办法)

    Excel撤销工作表保护方法 前言 1.Excel工作表保护表现 2.忘记密码如何清除Excel的密码保护 1.第一步:录制宏 2.第二步:结束宏 3.第三步:编辑宏脚本 4.运行结果 前言 在某工作 ...

  2. excel撤销工作表保护默认密码_我的表格我做主:Excel工作表不想被别人改动,设置一个密码保护...

    工作中,一个Excel表格需要多人填充数据时.或者发给同事的表格只允许查看时,不想表格回来时已面目全非. 今天小编教你设置工作表保护密码,不需要再三叮嘱,只允许查看表格数据的整体设置保护,需要多人填充 ...

  3. excel取消工作表保护

    设置excel文件工作表保护,可以有效保护文件内容,但如果很多文件都设置了工作表保护,密码还不一样的话,可能会导致密码弄混.不记得密码.可是想要编辑excel文件就必须撤销工作表保护才行.网上有很多使 ...

  4. excel文件工作表保护如何取消

    excel文件设置了工作表保护,想要编辑excel文件就需要对excel文件的工作表保护进行撤销,但是如果想要撤销的前提是输入正确的密码,因为在设置工作表保护的时候设置了密码,所以想要撤销保护也需要输 ...

  5. Excel 撤消工作表保护密码

    Excel表格密码保护的解除方法 表格受密码保护时,我们修改数据Excel弹出"您试图更改的单元格或图表受保护,因而是只读的.若要修改受保护单元格或图表,请先使用'撤消工作表保护'命令(在' ...

  6. Excel破解工作表保护密码

    目录: 一.破解过程 1.新建一个EXCEL文件"BOOK1",在工具栏空白位置,任意右击,选择Visual Basic项,弹出Visual Basic工具栏 2.在Visual ...

  7. excel取消工作表保护,获取原始密码

    您试图更改的单元格或图表位于受保护的工作表中.若要进行更改,请取消工作表保护.您可能需要输入密码. 网上找的解决办法,在excel2016中试过后,有效. 1.打开需要破解保护密码的Excel文件: ...

  8. Excel 2013 工作表保护密码破解

    温馨提示: 此方法不适用于 一打开就要输入密码 才能查看的表格 之前整理了下 Excel 2013 的工作表保护密码破解办法 今天无意中又用到了,就分享出来吧 Tips:如果你想彻底加密你的工作表,把 ...

  9. excel 文件工作表保护密码破解

    1.快捷键A1t F11打开vbe编辑器→插入菜单 2.选择"插入"模块 3.把下面的代码复制过去→然后把光标点到代码里→F5运行一下→工作表保护就破解了. Sub 破解工作表密码 ...

最新文章

  1. ZNNT-5NM 扭矩测量模块
  2. mac下安装nginx
  3. Linux 信号随笔
  4. 400W SOD-123封装 TVS管SMF4L系列 型号齐全
  5. 网页上的摄影展:等高响应布局实现
  6. mysql 修改这段长度_MySQL中使用group_concat()函数数据被截取(有默认长度限制),谨慎!...
  7. 解决百度 ueditor v1.4.3 编辑器上传图片失真的bug?
  8. Android 屏幕旋转 处理 AsyncTask 和 ProgressDialog 的最佳方案
  9. 【华为2019年校园招聘】2019-5-8 软件题
  10. 黑晓军 华中科技大学 博士 副教授
  11. Crackme#1算法注册机
  12. 联通服务器光信号亮红灯移动,联通los红灯闪啥意思(图文)
  13. java计算机毕业设计高校四六级报名管理系统源程序+mysql+系统+lw文档+远程调试
  14. 常用的js代码以及自动在线生成JavaScript工具地址
  15. oracle从序列中查最大id,Oracle序列详解
  16. 记kafka partition数据量过大导致不能正确重启
  17. Android 8.0 电池显示,电池定制
  18. gitlab配置SMTP方式发送邮件
  19. 双向LSTM or GRU(BiLSTM or BiGRU)的输出问题
  20. Notion-数据导入

热门文章

  1. javaweb JAVA JSP购物系统购物商城系统源码(jsp电子商务系统)购物系统mvc
  2. FishC《零基础学习python》笔记--第004讲:改进我们的小游戏
  3. 西门子精智屏下载触摸屏程序时提示缺少面板映像怎样解决?
  4. 今天突然看到一篇介绍WIN98的文章,才发现原来真的老了
  5. librtmp使用方法
  6. 电子科技大学《图论及其应用》复习总结--第三章 图的连通性
  7. 直接继承CompoundButton接收不到ACTION_UP的原因
  8. 物联网开发笔记(68)- 使用Micropython开发ESP32开发板之使用官方工具esptool烧录
  9. 线性代数学习之线性系统
  10. 给Mac安装Win10,windows支持软件未能存储到所选驱动器解决方案,万能方法。