- 积分
- 7694
- 明经币
- 个
- 注册时间
- 2017-2-18
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2022-6-23 09:32:07
|
显示全部楼层
Option Explicit
Sub xxx()
Dim x&
On Error Resume Next
For x = 1 To Sheets.Count
With Sheets(x)
.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFiltering:=True, AllowUsingPivotTables:=True
.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFiltering:=True, AllowUsingPivotTables:=True
.Protect DrawingObjects:=True, Contents:=True, Scenarios:= _
False, AllowFiltering:=True, AllowUsingPivotTables:=True
.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
True, AllowFiltering:=True, AllowUsingPivotTables:=True
.Unprotect
End With
Next x
End Sub |
|