马上hi我,马上帮你破解
密码忘了好像是没办法喽
你可以在网上找一下,好象有破解Excel密码的软件,不过不知道管不管用.
保护工作表的密码? 网络上有一段vb语句,(找不到我可以给你),复制到你的工作表中,运行,几分钟后就好了
你的问题解决起来比较复杂。一些朋友故弄玄虚,什么帮你破解,代码忘记了,其实是没有用的!
建议:使用我的方法:
1.工具---宏---录制新宏---(随便起个名字)---确定
2.停止录制
3.工具---宏---宏---(找到刚才命名那个宏)--- 编辑---(将下面的代码一个不剩复制粘贴)---退出
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