Syntax

expression.UserId

expression A variable that represents a UserPermission object.

Remarks

The UserPermission object associates a set of permissions on the active document with a single user and an optional expiration date. The UserID property returns the name in e-mail form of the user whose permissions are determined by the specified UserPermission object.

Example
The following example lists the users who have permissions on the active document.

Visual Basic for Applications
 Dim irmPermission As Office.Permission Dim irmUserPerm As Office.UserPermission Dim strUsers As String Set irmPermission = ActiveWorkbook.Permission If irmPermission.Enabled Then For Each irmUserPerm In irmPermission strUsers = strUsers & irmUserPerm.UserId & vbCrLf Next MsgBox strUsers, _ vbInformation + vbOKOnly, "IRM Information" Else MsgBox "Permissions are not enabled for this document.", _ vbInformation + vbOKOnly, "IRM Information" End If Set irmUserPerm = Nothing Set irmPermission = Nothing 
ofv user User ID userid userid property

See also: