ExcelActiveSheet.Protect的属性
(2022-08-08 16:58:38)Excel ActiveSheet.Protect
DrawingObjects:=False,
能编辑对象
Contents:=True,
内容
Scenarios:=False,
能编辑方案
AllowFormattingCells:=True,
格式化单元格
AllowFormattingColumns:=True,
格式化列
AllowFormattingRows:=True,
格式化行
AllowInsertingColumns:=True,
插入列
AllowInsertingRows:=True,
插入行
AllowInsertingHyperlinks:=True,
插入超链接
AllowDeletingColumns:=True,
删除列
AllowDeletingRows:=True,
删除行
AllowSorting:=True,
排序
AllowFiltering:=True,
筛选
AllowUsingPivotTables:=True
透视表
password:="123"
设置密码
另:
ActiveSheet.EnableSelection =
xlUnlockedCells
只选未锁定单元格
ActiveSheet.EnableSelection = xlNoSelection
只选锁定单元格