deli考勤机3960操作手册

news/2024/10/25 11:29:18/

管理员:【menu】->【ok】 8181

作者:胡杨
链接:https://www.zhihu.com/question/37928349/answer/257244089
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
 

Excel—“撤销工作表保护密码”的unlock并获取原始密码

在日常工作中,您是否遇到过这样的情况:您用Excel 编制的报表、表格、程序等,在单元

格中设置了公式、函数等,为了防止其他人修改您的设置或者防止您自己无意中修改,您可

能会使用Excel 的工作表保护功能,但时间久了保护密码容易忘记,这该怎么办?有时您从

网上下载的Excel 格式的小程序,您想修改,但是作者加了工作表保护密码,怎么办?您只

要按照以下步骤操作,Excel 工作表保护密码瞬间即破!

1、打开您需要unlock保护密码的Excel 文件;

2、依次点击菜单栏上的工具---宏----录制新宏,输入宏名字如:aa;

3、停止录制(这样得到一个空宏);

4、依次点击菜单栏上的工具---宏----宏,选aa,点编辑按钮;

5、删除窗口中的所有字符(只有几个),替换为下面的内容;

删除窗口中的所有字符,替换为下面的内容;

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

5.依次点击菜单栏上的工具---宏-----宏,选AllInternalPasswords,执行,确定两次; 
耐心等一会,再点击两次确定,就ok啦!


http://www.ppmy.cn/news/217652.html

相关文章

Win10双盘复制,出现0xc000000e蓝屏

情况说明。 Win10系统,原来是两个固态,一个是inter的SATA容量是256G(壹号盘)系统也装在这个盘,一个是建兴的是mSata容量是256G(贰号盘)。 现在更换一个1T的金百达SATA的固态硬盘(叁…

程序员的台式机组建之路

程序员的台式机组件之路 前言一、系统选择二、硬件选择2.1 CPU2.2 主板2.3 显卡2.4 固态硬盘2.5 内存条2.6 电源2.7 显示器2.8 机箱2.9 键盘&鼠标 前言 2022年7月的某一天。 夏天到了,总是背着电脑上下班感觉不太方便,而且消耗精力,很多…

ax200 兼容性问题 老路由器_我的华硕AX89X 160频宽和MU-MIMO问题,小米10测速-路由器交流...

理想丰满,现实骨感。华硕AX89X,可能只是我买到的这台是这样子,百度里查了一下,有人可以用AX200能有2.4G速率,而我一直是1.2G速率,用intel 9260ac也只是867Mbps,没见1.7Gbps,而相同的网卡在AX3000里相同的设置,一连接就是2.4G和1.7G。第一次开机运行后便升级了最新的固…

计算机主机风扇怎么庄,机箱风扇怎么装

机箱风扇怎么装 呼~终于要写装机流程了,之前的文章里已经提到配置了。担心好多朋友没有看过学弟之前文章,所以还是简单的说一下这套配置。虽然十代英特尔已经发布,但是主板跟CPU的价格都有些偏高,导致这次装机依旧选择的是AMD平台…

华擎Z370太极搭配QTJ0的使用经验分享

目录 一、前言二、如何点亮魔改CPU三、BIOS优化四、存在的问题五、致谢 一、前言 之前使用华硕 Z170I PRO GAMING 搭配 QTJ0 使用了一段时间,感觉扩展性不太够用,遂于闲鱼上购置了一块 ASRock Z370 Taichi 主板,折腾了几天总结一下经验。 配…

威联通TS-453Bmini NAS加装内存,轻松玩转虚拟机安装win10系统

威联通TS-453Bmini NAS加装内存,轻松玩转虚拟机安装win10系统 TS-453Bmini到手也有一两个月了,楼主也在不断折腾新的玩法,这不,在看完各路大神说NAS不玩虚拟机就是浪费之后,就开始折腾虚拟机了。 “虚拟机&#xff0…

小米游戏本拆机——安装固态硬盘和内存条

笔记本型号:小米游戏本6999版 GTX1060 128G 8G 正巧618期间,于是买了以下东西: 8G内存:宇瞻NOX 暗黑女神 DDR4 笔记本内存 2400 8G 到手价460rmb240G固态硬盘:金百达KM240 240GB M.2 NVMe 固态硬盘 到手价319rmb赶紧拆机搞起来~ 拆机工具:一字螺丝刀

MacBook Air SSD 固态硬盘 升级

MacBook 13inch, Early 2015 128G 升级 1T SSD 总结1. Macbook Air 信息2. 1T SSD购买信息转接卡组合M.2 SSD 和转接卡 3. 打开后盖找到SSD 4. 安装新的SSD5. 恢复系统SSD 初始化从备份恢复系统 6. SSD的设置调整大功告成 总结 苹果原装的SSD接口并非公开市场常见的接口&#…