Syntax

expression.Remove

expression Required. A variable that represents a object.

Remarks

The UserPermission object associates a set of permissions on the active document with a single user and an optional expiration date. The Remove method removes the user and the set of user permissions determined by the specified UserPermission object.

Example

The following example removes the second user's permissions on the active document from the document's Permission collection.

Visual Basic for Applications
 Dim irmPermission As Office.Permission Dim irmUserPerm As Office.UserPermission Set irmPermission = ActiveWorkbook.Permission Set irmUserPerm = irmPermission.Item(2) irmUserPerm.Remove MsgBox "Permission removed.", _ vbInformation + vbOKOnly, "IRM Information" Set irmUserPerm = Nothing Set irmPermission = Nothing 

See also: