UserAccessList 集合的功能(VBA)
时间:2021-03-31 09:13:47|栏目:|点击: 次
返回一个 UserAccessList 集合后,便可用 Count 属性来确定访问受保护区域的用户数量。在下例中,Microsoft Excel 将访问第一个受保护区域的用户的数量通知给用户。本示例假定受保护的区域位于活动工作表上。
Sub UseDeleteAll()
Dim wksSheet As Worksheet
Set wksSheet = Application.ActiveSheet
' Notify the user the number of users that can access the protected range.
MsgBox wksSheet.Protection.AllowEditRanges(1).Users.Count
End Sub
复制代码 代码如下:
Sub UseDeleteAll()
Dim wksSheet As Worksheet
Set wksSheet = Application.ActiveSheet
' Notify the user the number of users that can access the protected range.
MsgBox wksSheet.Protection.AllowEditRanges(1).Users.Count
End Sub
上一篇:清除双关联木马“聪明基因”
栏 目:
下一篇:Powershell小技巧之通过EventLog查看近期电脑开机和关机时间
本文标题:UserAccessList 集合的功能(VBA)
本文地址:http://www.codeinn.net/misctech/91724.html






