Excel中表格工作表保护密码撤销步骤及有效代码文档格式.docx

上传人:聆听****声音 文档编号:3666145 上传时间:2023-05-02 格式:DOCX 页数:10 大小:331.42KB
下载 相关 举报
Excel中表格工作表保护密码撤销步骤及有效代码文档格式.docx_第1页
第1页 / 共10页
Excel中表格工作表保护密码撤销步骤及有效代码文档格式.docx_第2页
第2页 / 共10页
Excel中表格工作表保护密码撤销步骤及有效代码文档格式.docx_第3页
第3页 / 共10页
Excel中表格工作表保护密码撤销步骤及有效代码文档格式.docx_第4页
第4页 / 共10页
Excel中表格工作表保护密码撤销步骤及有效代码文档格式.docx_第5页
第5页 / 共10页
Excel中表格工作表保护密码撤销步骤及有效代码文档格式.docx_第6页
第6页 / 共10页
Excel中表格工作表保护密码撤销步骤及有效代码文档格式.docx_第7页
第7页 / 共10页
Excel中表格工作表保护密码撤销步骤及有效代码文档格式.docx_第8页
第8页 / 共10页
Excel中表格工作表保护密码撤销步骤及有效代码文档格式.docx_第9页
第9页 / 共10页
Excel中表格工作表保护密码撤销步骤及有效代码文档格式.docx_第10页
第10页 / 共10页
亲,该文档总共10页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

Excel中表格工作表保护密码撤销步骤及有效代码文档格式.docx

《Excel中表格工作表保护密码撤销步骤及有效代码文档格式.docx》由会员分享,可在线阅读,更多相关《Excel中表格工作表保护密码撤销步骤及有效代码文档格式.docx(10页珍藏版)》请在冰点文库上搜索。

Excel中表格工作表保护密码撤销步骤及有效代码文档格式.docx

eliminateoneExitSub(Version1.1.1)

RevealshashedpasswordsNOToriginalpasswords

ConstDBLSPACEAsString=vbNewLine&

vbNewLine

ConstAUTHORSAsString=DBLSPACE&

vbNewLine&

_

"

AdaptedfromBobMcCormickbasecodeby"

&

NormanHarkerandJEMcGimpsey"

ConstHEADERAsString="

AllInternalPasswordsUserMessage"

ConstVERSIONAsString=DBLSPACE&

"

Version1.1.12003-Apr-04"

ConstREPBACKAsString=DBLSPACE&

Pleasereportfailure"

tothemicrosoft.public.excel.programmingnewsgroup."

ConstALLCLEARAsString=DBLSPACE&

Theworkbookshould"

nowbefreeofallpasswordprotection,somakesureyou:

DBLSPACE&

SAVEITNOW!

DBLSPACE&

andalso"

BACKUP!

BACKUP!

!

Also,rememberthatthepasswordwas"

putthereforareason.Don'

tstuffupcrucialformulas"

ordata."

Accessanduseofsomedata"

maybeanoffense.Ifindoubt,don'

t."

ConstMSGNOPWORDS1AsString="

Therewerenopasswordson"

sheets,orworkbookstructureorwindows."

AUTHORS&

VERSION

ConstMSGNOPWORDS2AsString="

Therewasnoprotectionto"

workbookstructureorwindows."

Proceedingtounprotectsheets."

ConstMSGTAKETIMEAsString="

AfterpressingOKbuttonthis"

willtakesometime."

Amountoftime"

dependsonhowmanydifferentpasswords,the"

passwords,andyourcomputer'

sspecification."

Justbepatient!

Makemeacoffee!

ConstMSGPWORDFOUND1AsString="

YouhadaWorksheet"

StructureorWindowsPasswordset."

Thepasswordfoundwas:

Noteitdownforpotentialfutureuseinotherworkbooksby"

thesamepersonwhosetthispassword."

Nowtocheckandclearotherpasswords."

ConstMSGPWORDFOUND2AsString="

passwordset."

Noteitdownforpotential"

futureuseinotherworkbooksbysamepersonwho"

setthispassword."

Nowtocheckandclear"

otherpasswords."

ConstMSGONLYONEAsString="

Onlystructure/windows"

protectedwiththepasswordthatwasjustfound."

ALLCLEAR&

VERSION&

REPBACK

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

.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(l)&

Chr(m)&

Chr(i3)&

Chr(i4)&

MsgBoxApplication.Substitute(MSGPWORDFOUND1,_

PWord1),vbInformation,HEADER

ExitDo'

Bypassallfor...nexts

Next:

Next:

Next

LoopUntilTrue

OnErrorGoTo0

IfWinTagAndNotShTagThen

MsgBoxMSGONLYONE,vbInformation,HEADER

AttemptclearancewithPWord1

w1.UnprotectPWord1

ChecksforallclearShTagtriggeredto1ifnot.

IfShTagThen

Withw1

If.ProtectContentsThen

Dummydoloop

IfNot.ProtectContentsThen

MsgBoxApplication.Substitute(MSGPWORDFOUND2,_

leveragefindingPwordbytryingonothersheets

ForEachw2InWorksheets

w2.UnprotectPWord1

Nextw2

MsgBoxALLCLEAR&

REPBACK,vbInformation,HEADER

EndSub

7、视图—宏—查看宏,选AllInternalPasswords,点击执行,连点几个确定密码撤销完毕。

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > IT计算机 > 电脑基础知识

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2