当前位置:文档之家› excel表格如果取消保护

excel表格如果取消保护

竭诚为您提供优质文档/双击可除excel表格如果取消保护
篇一:如何撤销excel工作表保护
excel工作表编辑资料,设置了工作表保护后,不能对表格进行插入删除操作。

如果没有密码,很简单:工具-选项—工作表保护——撤消工作表保护就可以了。

如果忘记密码,如下操作:
1\打开文件
2\工具---宏----录制新宏---输入名字如:a
3\停止录制(这样得到一个空宏)
4\工具---宏----宏,选a,点编辑按钮
5\删除窗口中的所有字符(只有几个),替换为下面的内容:(复制下来)
optionexplicit
publicsuballinternalpasswords()
breaksworksheetandworkbookstructurepasswords.bobmcc ormick
probablyoriginatorofbasecodealgorithmmodifiedforcov erage
ofworkbookstructure/windowspasswordsandformultiplep asswords
normanharkerandjemcgimpsey27-dec-20xx(Version1.1) modified20xx-apr-04byjem:allmsgstoconstants,and eliminateoneexitsub(Version1.1.1)
Revealshashedpasswordsnotoriginalpasswords
constdblspaceasstring=vbnewlinetstuffupcrucialformu las"t."
constmsgnopwoRds1asstring="therewerenopasswordson"s specification."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)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
dodummydoloop
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)leveragefindingpwordbytryingono thersheets
Foreachw2inworksheets
w2.unprotectpword1
nextw2
exitdobypassallfor...nexts
endif
next:next:next:next:next:next
next:next:next:next:next:next
loopuntiltrue
onerrorgoto0
endif
endwith
nextw1
endif
msgboxallcleaRbreaksworksheetandworkbookstructurepa sswords.bobmccormick
probablyoriginatorofbasecodealgorithmmodifiedforcov erage
ofworkbookstructure/windowspasswordsandformultiplep asswords
normanharkerandjemcgimpsey27-dec-20xx(Version1.1) modified20xx-apr-04byjem:allmsgstoconstants,and eliminateoneexitsub(Version1.1.1)
Revealshashedpasswordsnotoriginalpasswords
constdblspaceasstring=vbnewlinetstuffupcrucialformu las"t."
constmsgnopwoRds1asstring="therewerenopasswordson"s specification."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)bypassallfor...nexts
endif
endwith
next:next:next:next:next:next
next:next:next:next:next:next
loopuntiltrue
onerrorgoto0
endif
ifwintagandnotshtagthen
msgboxmsgonlyone,vbinformation,headeR
exitsub。

相关主题