问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

如何撤销excel表格所有单元格的保护,?

发布网友 发布时间:2022-04-23 02:14

我来回答

4个回答

热心网友 时间:2022-05-03 06:08

 在excel中取消工作表的保护命令的方法:

1.打开excel,运行视图—宏—录制新宏—输入宏名如:aa(aa是可随意输入)。

2.停止录制,这样得到一个空宏。

3.同样视图—宏—查看宏—选aa(aa为之前新建的宏)—点击编辑按钮。

4.删除窗口中的所有字符,复制下面的内容粘贴。

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 'mmy 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

5.关闭编辑窗口。

6.视图—宏—查看宏,选AllInternalPasswords,点击执行,确定两次,等2分钟,再确定。密码撤销完毕。

热心网友 时间:2022-05-03 07:26

若是03版的EXCEL,就是工具-保护-取消保护,输入密码即可。
若是07版的则选取审阅项里“更改”栏里的“保护工作表、保护工作簿等等”就行了。

热心网友 时间:2022-05-03 09:01

在哪个菜单里设置的,就在同样的菜单里撤销,03版本的是在工具菜单里

热心网友 时间:2022-05-03 10:52

工具-保护-取消保护
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
怎么取消微信亲情卡 米兰花冬季耐寒多少度 猫为什么喜欢咬人 看看是不是触碰到猫咪禁区了? 幼猫开始咬人是不是要磨牙了的表现 为什么刚到家的猫咪咬人 生气可导致女人8大器官受伤害 如何在windows10中打开任务管理器 windows10资源管理器怎么打开 急问!!下列汉字的构造方式"下、雨、客、武、从、荆、日、绳” 贵州黔运紫金文化传媒有限公司怎么样? 贵州黔之龙文化传媒有限公司怎么样? 为什么女生上厕所也需要人陪? 女生上厕所为啥要拿纸? 如何取消excel中默认单元格 女人上厕所和男人上厕所有什么区别? excel 如何取消单元格的关联 用馒头怎么做披萨? 家庭版馒头披萨的做法是什么? 博世gbm350re手电钻怎样换夹头夹头里没有锣丝请高手指点 如何更换手电钻钻头夹 东成手电钻头子怎么换 博士手电钻怎么换夹头?求解 美耐特手钻怎么换钻头夹头 普通钻夹头如何换自锁夹头? 手电钻夹头怎么修 SOS 手电钻夹头咋换? 电钻如何换钻头 图? 威克士wx-jcr的夹头怎么更换 手电钻的钻夹要怎么样才能拆开,我想换个新的钻夹 手电钻夹头怎么拆开?我想换 华为手机通话显示hd怎么关闭 如何取消excel单元格设定的数值 为什么女厕所总是在排长队,女生上厕所到底有多难? excel表格当选择多个单元格按着ctrl键多选了某个单元格如何取消? 女生频繁上厕所是什么原因? EXCEL不同单元格格式太多,卡死了怎么办,关也关不掉,急! 女生上厕所要男生陪? 如何取消Excel 2013中单元格的直接编辑状态 印度厕所都是露天,女性怎么上厕所? 刘佳氏:有两个刘佳氏,一个是满洲姓氏,隶正白旗包衣籍;一个是蒙古姓氏,隶镶黄旗包衣。 请问在上海的那几家商店可以买到OPPO FINDER,价格也会是2498吗? 镶黄旗姚姓 祖籍辽宁义县 想知道老姓是 本家族谱福 万文成志 我姓桂,满族,镶黄旗人。原籍:北京市复兴门外真武庙。请问我的满族姓氏是什么? 谢谢! 我姓佟 祖籍辽宁黑山 满族镶黄旗 满族姓氏是什么 我是满族镶黄旗的,祖籍辽宁沈阳,姓董,我家原姓是什么啊 肇嘉浜路哪里有修苹果手机的售后中心? 我姓戴,祖籍辽宁凤城,满族镶黄旗的,我想知道我的老姓是什么,谢谢! 汉姓是刘,祖籍山西,镶黄旗人,请问满族姓是什么?多谢 镶工的打孔秘籍怎么得到? 天王传奇秘籍镶嵌的时候,怎么都替换了?不 请问舒尔哈齐的后人姓氏是什么?旗籍是什么?有没有是镶黄旗的?