更新日期:2018-04-13 作者:技术员联盟官网 来源:http://www.jishuyuan.cc
excel密码完全记不起来了怎么汉化excel密码
对于之前的Excel使用介绍讲了如何在工作中保护好Excel表格里的数据。虽然强调了一定要记得密码,不然自己也只能哭着重做一份。但凡是总有万一,今天的Excel真就忘记了密码怎么是好! 接下来就让主编告诉你excel有密码怎么汉化吧。这
excel有密码怎么汉化
打开需要汉化的Excel文件
依次点击菜单栏上的工具---宏----录制新宏
输入宏名字,然后停止录制(这样得到一个空宏,为后面添加vb代码做准备)#f#
依次点击菜单栏上的工具---宏----宏,选易尔拓,点编辑按钮;
删除窗口中的所有字符,替换为下面的内容;
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 / win 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 win." & AuTHoRs & VERsion
Const MsGnopwoRds2 As string = "There was no protection to " & _
"workbook structure or win." & 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 win 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 / win " & _
"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 .protectwin
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
1/2 1 2 下一页 尾页