UserAccessList object (Excel)
A collection of UserAccess objects that represents the user access for protected ranges.
Example
Use the Users property of the protected AllowEditRange object to return a UserAccessList collection.
After 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 of the number of 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 of the number of users that can access the protected range.
MsgBox wksSheet.Protection.AllowEditRanges(1).Users.Count
End Sub
Methods
Properties
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.