当前位置:   article > 正文

Excel ActiveSheet.Protect 的属性_activesheet.enableselection = xlnorestrictions

activesheet.enableselection = xlnorestrictions

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       只选锁定单元格

 

EnableSelection   Remarks

This property takes effect only when the worksheet is protected:

xlNoSelection prevents any selection on the sheet,

xlUnlockedCells allows only those cells whose Locked property is False to be selected,

and xlNoRestrictions allows any cell to be selected.

Example

This example sets worksheet one so that nothing on it can be selected.

  1. With Worksheets(1)
  2. .EnableSelection = xlNoSelection
  3. .Protect Contents:=True, UserInterfaceOnly:=True
  4. End With

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/170441?site
推荐阅读
相关标签
  

闽ICP备14008679号