UserAccessList Collection
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
AllowEditRange UserAccessList UserAccess |
A collection of UserAccess objects that represent the user access for protected ranges.
Using the UserAccessList Collection
Use the Users property of the ProtectedRange object to return a UserAccessList collection.
Once a UserAccessList collection is returned you can use the Count property to determine the number of users that have access to a protected range. In the following example, Microsoft Excel notifies the user the numbers users that have access to the first protected range. This example assumes that a protected range exists on the active worksheet.
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