Share via


AllowEditRange.Users Property

Excel Developer Reference

Returns a UserAccessList object for the protected range on a worksheet.

Syntax

expression.Users

expression   A variable that represents an AllowEditRange object.

Example

In this example, Microsoft Excel displays the name of the first user allowed access to the first protected range on the active worksheet. This example assumes that a range has been chosen to be protected and that a particular user has been given access to this range.

Visual Basic for Applications
  Sub DisplayUserName()
Dim wksSheet As Worksheet

Set wksSheet = Application.ActiveSheet

' Display name of user with access to protected range.
MsgBox wksSheet.Protection.AllowEditRanges(1).<strong class="bterm">Users</strong>(1).Name

End Sub

See Also