UserAccessList 集合的功能(VBA) 2020-02-16 分类:VB 标签Tags:集合,功能,vba,返回,便可,count,属性,确定,访问,保护区,用户数,在下,microsoft,excel,第一个
返回一个 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 以上就是【UserAccessList 集合的功能(VBA)】的全部内容了,欢迎留言评论进行交流!