excel2022工作表如何撤銷保護_第1頁
excel2022工作表如何撤銷保護_第2頁
excel2022工作表如何撤銷保護_第3頁
excel2022工作表如何撤銷保護_第4頁
excel2022工作表如何撤銷保護_第5頁
已閱讀5頁,還剩8頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

excel2022工作表如何撤銷保護篇一:如何撤銷Excel工作表保護

EXCEL工作表編輯資料,設(shè)置了工作表保護后,不能對表格進展操作。假如沒有密碼,很簡單:工具-選項—工作表保護——撤消工作表保護就可以了。假如忘記密碼或者不知道密碼,執(zhí)行如下操作:

1、翻開文件

2、工具---宏----錄制新宏---輸入名字如:a

3、停頓錄制(這樣得到一個空宏)

4、工具---宏----宏,選a,點編輯按鈕

5、刪除窗口中的所有字符(只有幾個),交換為下面的內(nèi)容:(復(fù)制下來)

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、關(guān)閉編輯窗口

7、工具---宏-----宏,選AllInternalPasswords,運行,確定兩次,等2分鐘(確實有這么長時間),再確定.OK,沒有密碼了!

篇二:如何撤銷Excel工作表保護

EXCEL工作表編輯資料,設(shè)置了工作表保護后,不能對表格進展插入刪除操作。

假如沒有密碼,很簡單:工具-選項—工作表保護——撤消工作表保護就可以了。

假如忘記密碼,如下操作:

1\翻開文件

2\工具---宏----錄制新宏---輸入名字如:a

3\停頓錄制(這樣得到一個空宏)

4\工具---宏----宏,選a,點編輯按鈕

5\刪除窗口中的所有字符(只有幾個),交換為下面的內(nèi)容:(復(fù)制下來)

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\關(guān)閉編輯窗口

7\工具---宏-----宏,選AllInternalPasswords,運行,確定兩次,等2分鐘(確實有這么長時間),再確定.OK,沒有密碼了!!

篇三:如何Excel撤銷工作表保護

如何Excel撤銷工作表保護EXCEL密碼保護破解2022-01-2209:56方法:

1\翻開文件

2\工具---宏----錄制新宏---輸入名字如:aa

3\停頓錄制(這樣得到一個空宏)

4\工具---宏----宏,選aa,點編輯按鈕

5\刪除窗口中的所有字符(只有幾個),交換為下面的內(nèi)容:(復(fù)制吧)

6\關(guān)閉編輯窗口

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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論