




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
excel2022工作表如何撤销保护篇一:如何撤销Excel工作表保护
EXCEL工作表编辑资料,设置了工作表保护后,不能对表格进展操作。假如没有密码,很简单:工具-选项—工作表保护——撤消工作表保护就可以了。假如忘记密码或者不知道密码,执行如下操作:
1、翻开文件
2、工具---宏----录制新宏---输入名字如:a
3、停顿录制(这样得到一个空宏)
4、工具---宏----宏,选a,点编辑按钮
5、删除窗口中的所有字符(只有几个),交换为下面的内容:(复制下来)
OptionExplicit
PublicSubAllInternalPasswords()
'Breaksworksheetandworkbookstructurepasswords.BobMcCormick
'probablyoriginatorofbasecodealgorithmmodifiedforcoverage
'ofworkbookstructure/windowspasswordsandformultiplepasswords
'
'NormanHarkerandJEMcGimpsey27-Dec-2022(Version1.1)
'Modified2022-Apr-04byJEM:Allmsgstoconstants,and
'eliminateoneExitSub(Version1.1.1)
'RevealshashedpasswordsNOToriginalpasswords
ConstDBLSPACEAsString=vbNewLinevbNewLine
ConstAUTHORSAsString=DBLSPACEvbNewLine_
"AdaptedfromBobMcCormickbasecodeby"_
"NormanHarkerandJEMcGimpsey"
ConstHEADERAsString="AllInternalPasswordsUserMessage"
ConstVERSIONAsString=DBLSPACE"Version1.1.12022-Apr-04"
ConstREPBACKAsString=DBLSPACE"Pleasereportfailure"_
"grammingnewsgroup."
ConstALLCLEARAsString=DBLSPACE"Theworkbookshould"_
"nowbefreeofallpasswordprotection,somakesureyou:"_
DBLSPACE"SAVEITNOW!"DBLSPACE"andalso"_
DBLSPACE"BACKUP!,BACKUP!!,BACKUP!!!"_
DBLSPACE"Also,rememberthatthepasswordwas"_
"putthereforareason.Don'tstuffupcrucialformulas"_
"ordata."DBLSPACE"Accessanduseofsomedata"_
"maybeanoffense.Ifindoubt,don't."
ConstMSGNOPWORDS1AsString="Therewerenopasswordson"_
"sheets,orworkbookstructureorwindows."AUTHORSVERSION
ConstMSGNOPWORDS2AsString="Therewasnoprotectionto"_
"workbookstructureorwindows."DBLSPACE_
"Proceedingtounprotectsheets."AUTHORSVERSION
ConstMSGTAKETIMEAsString="AfterpressingOKbuttonthis"_
"willtakesometime."DBLSPACE"Amountoftime"_
"dependsonhowmanydifferentpasswords,the"_
"passwords,andyourputer'sspecification."DBLSPACE_
"Justbepatient!Makemeacoffee!"AUTHORSVERSION
ConstMSGPWORDFOUND1AsString="YouhadaWorksheet"_
"StructureorWindowsPasswordset."DBLSPACE_
"Thepasswordfoundwas:"DBLSPACE"$$"DBLSPACE_
"Noteitdownforpotentialfutureuseinotherworkbooksby"_
"thesamepersonwhosetthispassword."DBLSPACE_
"Nowtocheckandclearotherpasswords."AUTHORSVERSION
ConstMSGPWORDFOUND2AsString="YouhadaWorksheet"_
"passwordset."DBLSPACE"Thepasswordfoundwas:"_
DBLSPACE"$$"DBLSPACE"Noteitdownforpotential"_
"futureuseinotherworkbooksbysamepersonwho"_
"setthispassword."DBLSPACE"Nowtocheckandclear"_
"otherpasswords."AUTHORSVERSION
ConstMSGONLYONEAsString="Onlystructure/windows"_
"protectedwiththepasswordthatwasjustfound."_
ALLCLEARAUTHORSVERSIONREPBACK
Dimw1AsWorksheet,w2AsWorksheet
DimiAsInteger,jAsInteger,kAsInteger,lAsInteger
DimmAsInteger,nAsInteger,i1AsInteger,i2AsInteger
Dimi3AsInteger,i4AsInteger,i5AsInteger,i6AsInteger
DimPWord1AsString
DimShTagAsBoolean,WinTagAsBoolean
Application.ScreenUpdating=False
WithActiveWorkbook
WinTag=.ProtectStructureOr.ProtectWindows
EndWith
ShTag=False
ForEachw1InWorksheets
ShTag=ShTagOrw1.ProtectContents
Nextw1
IfNotShTagAndNotWinTagThen
MsgBoxMSGNOPWORDS1,vbInformation,HEADER
ExitSub
EndIf
MsgBoxMSGTAKETIME,vbInformation,HEADER
IfNotWinTagThen
MsgBoxMSGNOPWORDS2,vbInformation,HEADER
Else
OnErrorResumeNext
Do'dummydoloop
Fori=65To66:Forj=65To66:Fork=65To66
Forl=65To66:Form=65To66:Fori1=65To66
Fori2=65To66:Fori3=65To66:Fori4=65To66
Fori5=65To66:Fori6=65To66:Forn=32To126
WithActiveWorkbook
.UnprotectChr(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=FalseAnd_
.ProtectWindows=FalseThen
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)
MsgBoxApplication.Substitute(MSGPWORDFOUND1,_
"$$",PWord1),vbInformation,HEADER
ExitDo'Bypassallfor...nexts
EndIf
EndWith
Next:Next:Next:Next:Next:Next
Next:Next:Next:Next:Next:Next
LoopUntilTrue
OnErrorGoTo0
EndIf
IfWinTagAndNotShTagThen
MsgBoxMSGONLYONE,vbInformation,HEADER
ExitSub
EndIf
OnErrorResumeNext
ForEachw1InWorksheets
'AttemptclearancewithPWord1
w1.UnprotectPWord1
Nextw1
OnErrorGoTo0
ShTag=False
ForEachw1InWorksheets
'ChecksforallclearShTagtriggeredto1ifnot.
ShTag=ShTagOrw1.ProtectContents
Nextw1
IfShTagThen
ForEachw1InWorksheets
Withw1
If.ProtectContentsThen
OnErrorResumeNext
Do'Dummydoloop
Fori=65To66:Forj=65To66:Fork=65To66
Forl=65To66:Form=65To66:Fori1=65To66
Fori2=65To66:Fori3=65To66:Fori4=65To66
Fori5=65To66:Fori6=65To66:Forn=32To126
.UnprotectChr(i)Chr(j)Chr(k)_
Chr(l)Chr(m)Chr(i1)Chr(i2)Chr(i3)_
Chr(i4)Chr(i5)Chr(i6)Chr(n)
IfNot.ProtectContentsThen
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)
MsgBoxApplication.Substitute(MSGPWORDFOUND2,_
"$$",PWord1),vbInformation,HEADER
'leveragefindingPwordbytryingonothersheets
ForEachw2InWorksheets
w2.UnprotectPWord1
Nextw2
ExitDo'Bypassallfor...nexts
EndIf
Next:Next:Next:Next:Next:Next
Next:Next:Next:Next:Next:Next
LoopUntilTrue
OnErrorGoTo0
EndIf
EndWith
Nextw1
EndIf
MsgBoxALLCLEARAUTHORSVERSIONREPBACK,vbInformation,HEADER
EndSub
6、关闭编辑窗口
7、工具---宏-----宏,选AllInternalPasswords,运行,确定两次,等2分钟(确实有这么长时间),再确定.OK,没有密码了!
篇二:如何撤销Excel工作表保护
EXCEL工作表编辑资料,设置了工作表保护后,不能对表格进展插入删除操作。
假如没有密码,很简单:工具-选项—工作表保护——撤消工作表保护就可以了。
假如忘记密码,如下操作:
1\翻开文件
2\工具---宏----录制新宏---输入名字如:a
3\停顿录制(这样得到一个空宏)
4\工具---宏----宏,选a,点编辑按钮
5\删除窗口中的所有字符(只有几个),交换为下面的内容:(复制下来)
OptionExplicit
PublicSubAllInternalPasswords()
'Breaksworksheetandworkbookstructurepasswords.BobMcCormick
'probablyoriginatorofbasecodealgorithmmodifiedforcoverage
'ofworkbookstructure/windowspasswordsandformultiplepasswords
'
'NormanHarkerandJEMcGimpsey27-Dec-2022(Version1.1)
'Modified2022-Apr-04byJEM:Allmsgstoconstants,and
'eliminateoneExitSub(Version1.1.1)
'RevealshashedpasswordsNOToriginalpasswords
ConstDBLSPACEAsString=vbNewLinevbNewLine
ConstAUTHORSAsString=DBLSPACEvbNewLine_
"AdaptedfromBobMcCormickbasecodeby"_
"NormanHarkerandJEMcGimpsey"
ConstHEADERAsString="AllInternalPasswordsUserMessage"
ConstVERSIONAsString=DBLSPACE"Version1.1.12022-Apr-04"
ConstREPBACKAsString=DBLSPACE"Pleasereportfailure"_
"grammingnewsgroup."
ConstALLCLEARAsString=DBLSPACE"Theworkbookshould"_
"nowbefreeofallpasswordprotection,somakesureyou:"_
DBLSPACE"SAVEITNOW!"DBLSPACE"andalso"_
DBLSPACE"BACKUP!,BACKUP!!,BACKUP!!!"_
DBLSPACE"Also,rememberthatthepasswordwas"_
"putthereforareason.Don'tstuffupcrucialformulas"_
"ordata."DBLSPACE"Accessanduseofsomedata"_
"maybeanoffense.Ifindoubt,don't."
ConstMSGNOPWORDS1AsString="Therewerenopasswordson"_
"sheets,orworkbookstructureorwindows."AUTHORSVERSION
ConstMSGNOPWORDS2AsString="Therewasnoprotectionto"_
"workbookstructureorwindows."DBLSPACE_
"Proceedingtounprotectsheets."AUTHORSVERSION
ConstMSGTAKETIMEAsString="AfterpressingOKbuttonthis"_
"willtakesometime."DBLSPACE"Amountoftime"_
"dependsonhowmanydifferentpasswords,the"_
"passwords,andyourputer'sspecification."DBLSPACE_
"Justbepatient!Makemeacoffee!"AUTHORSVERSION
ConstMSGPWORDFOUND1AsString="YouhadaWorksheet"_
"StructureorWindowsPasswordset."DBLSPACE_
"Thepasswordfoundwas:"DBLSPACE"$$"DBLSPACE_
"Noteitdownforpotentialfutureuseinotherworkbooksby"_
"thesamepersonwhosetthispassword."DBLSPACE_
"Nowtocheckandclearotherpasswords."AUTHORSVERSION
ConstMSGPWORDFOUND2AsString="YouhadaWorksheet"_
"passwordset."DBLSPACE"Thepasswordfoundwas:"_
DBLSPACE"$$"DBLSPACE"Noteitdownforpotential"_
"futureuseinotherworkbooksbysamepersonwho"_
"setthispassword."DBLSPACE"Nowtocheckandclear"_
"otherpasswords."AUTHORSVERSION
ConstMSGONLYONEAsString="Onlystructure/windows"_
"protectedwiththepasswordthatwasjustfound."_
ALLCLEARAUTHORSVERSIONREPBACK
Dimw1AsWorksheet,w2AsWorksheet
DimiAsInteger,jAsInteger,kAsInteger,lAsInteger
DimmAsInteger,nAsInteger,i1AsInteger,i2AsInteger
Dimi3AsInteger,i4AsInteger,i5AsInteger,i6AsInteger
DimPWord1AsString
DimShTagAsBoolean,WinTagAsBoolean
Application.ScreenUpdating=False
WithActiveWorkbook
WinTag=.ProtectStructureOr.ProtectWindows
EndWith
ShTag=False
ForEachw1InWorksheets
ShTag=ShTagOrw1.ProtectContents
Nextw1
IfNotShTagAndNotWinTagThen
MsgBoxMSGNOPWORDS1,vbInformation,HEADER
ExitSub
EndIf
MsgBoxMSGTAKETIME,vbInformation,HEADER
IfNotWinTagThen
MsgBoxMSGNOPWORDS2,vbInformation,HEADER
Else
OnErrorResumeNext
Do'dummydoloop
Fori=65To66:Forj=65To66:Fork=65To66
Forl=65To66:Form=65To66:Fori1=65To66
Fori2=65To66:Fori3=65To66:Fori4=65To66
Fori5=65To66:Fori6=65To66:Forn=32To126
WithActiveWorkbook
.UnprotectChr(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=FalseAnd_
.ProtectWindows=FalseThen
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)
MsgBoxApplication.Substitute(MSGPWORDFOUND1,_
"$$",PWord1),vbInformation,HEADER
ExitDo'Bypassallfor...nexts
EndIf
EndWith
Next:Next:Next:Next:Next:Next
Next:Next:Next:Next:Next:Next
LoopUntilTrue
OnErrorGoTo0
EndIf
IfWinTagAndNotShTagThen
MsgBoxMSGONLYONE,vbInformation,HEADER
ExitSub
EndIf
OnErrorResumeNext
ForEachw1InWorksheets
'AttemptclearancewithPWord1
w1.UnprotectPWord1
Nextw1
OnErrorGoTo0
ShTag=False
ForEachw1InWorksheets
'ChecksforallclearShTagtriggeredto1ifnot.
ShTag=ShTagOrw1.ProtectContents
Nextw1
IfShTagThen
ForEachw1InWorksheets
Withw1
If.ProtectContentsThen
OnErrorResumeNext
Do'Dummydoloop
Fori=65To66:Forj=65To66:Fork=65To66
Forl=65To66:Form=65To66:Fori1=65To66
Fori2=65To66:Fori3=65To66:Fori4=65To66
Fori5=65To66:Fori6=65To66:Forn=32To126
.UnprotectChr(i)Chr(j)Chr(k)_
Chr(l)Chr(m)Chr(i1)Chr(i2)Chr(i3)_
Chr(i4)Chr(i5)Chr(i6)Chr(n)
IfNot.ProtectContentsThen
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)
MsgBoxApplication.Substitute(MSGPWORDFOUND2,_
"$$",PWord1),vbInformation,HEADER
'leveragefindingPwordbytryingonothersheets
ForEachw2InWorksheets
w2.UnprotectPWord1
Nextw2
ExitDo'Bypassallfor...nexts
EndIf
Next:Next:Next:Next:Next:Next
Next:Next:Next:Next:Next:Next
LoopUntilTrue
OnErrorGoTo0
EndIf
EndWith
Nextw1
EndIf
MsgBoxALLCLEARAUTHORSVERSIONREPBACK,vbInformation,HEADER
EndSub
6\关闭编辑窗口
7\工具---宏-----宏,选AllInternalPasswords,运行,确定两次,等2分钟(确实有这么长时间),再确定.OK,没有密码了!!
篇三:如何Excel撤销工作表保护
如何Excel撤销工作表保护EXCEL密码保护破解2022-01-2209:56方法:
1\翻开文件
2\工具---宏----录制新宏---输入名字如:aa
3\停顿录制(这样得到一个空宏)
4\工具---宏----宏,选aa,点编辑按钮
5\删除窗口中的所有字符(只有几个),交换为下面的内容:(复制吧)
6\关闭编辑窗口
7\工具---宏-----宏,选AllInternalPasswords,运行,确定两次,等2分钟,再确定.OK,没有密码了!!
代码如下:
PublicSubAllInternalPasswords()
'Breaksworksheetandworkbookstructurepasswords.BobMcCormick'probablyoriginatorofbasecodealgorithmmodifiedforcoverage
'ofworkbookstructure/windowspasswordsandformultiplepasswords'
'NormanHarkerandJEMcGimpsey27-Dec-2022(Version1.1)
'Modified2022-Apr-04byJEM:Allmsgstoconstants,and
'eliminateoneExitSub(Version1.1.1)
'RevealshashedpasswordsNOToriginalpasswords
ConstDBLSPACEAsString=vbNewLinevbNewLine
ConstAUTHORSAsString=DBLSPACEvbNewLine_
"AdaptedfromBobMcCormickbasecodeby"_
"NormanHarkerandJEMcGimpsey"
ConstHEADERAsString="AllInternalPasswordsUserMessage"
ConstVERSIONAsString=DBLSPACE"Version1.1.12022-Apr-04"ConstREPBACKAsString=DBLSPACE"Pleasereportfailure"_"grammingnewsgroup."
ConstALLCLEARAsString=DBLSPACE"Theworkbookshould"_"nowbefreeofallpasswordprotection,somakesureyou:"_
DBLSPACE"SAVEITNOW!"DBLSPACE"andalso"_
DBLSPACE"BACKUP!,BACKUP!!,BACKUP!!!"_
DBLSPACE"Also,rememberthatthepasswordwas"_
"putthereforareason.Don'tstuffupcrucialformulas"_
"ordata."DBLSPACE"Accessanduseofsomedata"_
"maybeanoffense.Ifindoubt,don't."
ConstMSGNOPWORDS1AsString="Therewerenopasswordson"_"sheets,orworkbookstructureorwindows."AUTHORSVERSIONConstMSGNOPWORDS2AsString="Therewasnoprotectionto"_"workbookstructureorwindows."DBLSPACE_
"Proceedingtounprotectsheets."AUTHORSVERSION
ConstMSGTAKETIMEAsString="AfterpressingOKbuttonthis"_"willtakesometime."DBLSPACE"Amountoftime"_
"dependsonhowmanydifferentpasswords,the"_
"passwords,andyourputer'sspecification."DBLSPACE_"Justbepatient!Makemeacoffee!"AUTHORSVERSION
ConstMSGPWORDFOUND1AsString="YouhadaWorksheet"_"StructureorWindowsPasswordset."DBLSPACE_
"Thepasswordfoundwas:"DBLSPACE"$$"DBLSPACE_"Noteitdownforpotentialfutureuseinotherworkbooksby"_"thesamepersonwhosetthispassword."DBLSPACE_
"Nowtocheckandclearotherpasswords."AUTHORSVERSIONConstMSGPWORDFOUND2AsString="YouhadaWorksheet"_"passwordset."DBLSPACE"Thepasswordfoundwas:"_DBLSPACE"$$"DBLSPACE"Noteitdownforpotential"_"futureuseinotherworkbooksbysamepersonwho"_
"setthispassword."DBLSPACE"Nowtocheckandclear"_"otherpasswords."AUTHORSVERSION
ConstMSGONLYONEAsString="Onlystructure/windows"_"protectedwiththepasswordthatwasjustfound."_
ALLCLEARAUTHORSVERSIONREPBACK
Dimw1AsWorksheet,w2AsWorksheet
DimiAsInteger,jAsInteger,kAsInteger,lAsInteger
DimmAsInteger,nAsInteger,i1AsInteger,i2AsInteger
Dimi3AsInteger,i4AsInteger,i5AsInteger,i6AsInteger
DimPWord1AsString
DimShTagAsBoolean,WinTagAsBoolean
Application.ScreenUpdating=False
WithActiveWorkbook
WinTag=.ProtectStructureOr.ProtectWindows
EndWith
ShTag=False
ForEachw1InWorksheets
ShTag=ShTagOrw1.ProtectContents
Nextw1
IfNotShTagAndNotWinTagThen
MsgBoxMSGNOPWORDS1,vbInformation,HEADER
ExitSub
EndIf
MsgBoxMSGTAKETIME,vbInformation,HEADER
IfNotWinTagThen
MsgBoxMSGNOPWORDS2,vbInformation,HEADER
Else
OnErrorResumeNext
Do'dummydoloop
Fori=65To66:Forj=65To66:Fork=65To66
Forl=65To66:Form=65To66:Fori1=65To66
Fori2=65To66:Fori3=65To66:Fori4=65To66
Fori5=65To66:Fori6=65To66:Forn=32To126
WithActiveWorkbook
.UnprotectChr(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=FalseAnd_
.ProtectWindows=FalseThen
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025煤炭购销合同2
- 井队员工合同样本
- 铁路护栏搬运方案范本
- 修补水沟合同样本
- 农村改造项目合同样本
- 公路牌安装合同样本
- 万科咨询合同样本
- 出售自用冷库合同样本
- 冲压配件订购合同样本
- 代理办证机构合同样本
- 2024年新人教版六年级数学上册《教材练习2练习二 附答案》教学课件
- 【核心素养目标】六年级科学下册(苏教版)4.13 洁净的水域(教案)
- 设备吊装作业施工方案
- 小学语文“的、地、得”专项练习(附答案)
- 2024至2030年中国去中心化标识符(DID)市场现状研究分析与发展前景预测报告
- 《建筑施工测量标准》JGJT408-2017
- 2024-2030年中国社区医院行业市场发展分析及前景趋势与投资研究报告
- 2024年四川省成都市郫都区五年级数学第二学期期末学业质量监测模拟试题含解析
- 黑龙江省齐齐哈尔市2024年中考数学试卷【附真题答案】
- 脱硫技术方案钠碱法脱硫
- 2024年广东省中考生物试卷附答案
评论
0/150
提交评论