'Show User Permissions : Workbook Permission « Excel « VBA / Excel / Access / Word






'Show User Permissions

 
Sub ShowUserPermissions()
    Dim myPermission As Office.Permission, usr As Office.UserPermission
    Set myPermission = ThisWorkbook.Permission
    Debug.Print "User", , "Permission", "Permission Expires"
    Set usr = myPermission("ExcelDemo@Hotmail.com")
    usr.Permission = MsoPermission.msoPermissionChange Or MsoPermission.msoPermissionPrint
    For Each usr In myPermission
        Debug.Print usr.UserId, usr.Permission, usr.ExpirationDate
    Next
    Debug.Print myPermission.DocumentAuthor, myPermission.RequestPermissionURL
End Sub

 








Related examples in the same category

1.Workbook permissions removed -- workbook access is no longer restricted through IRM.
2.Workbook permissions restricted
3.Granted permission to two users.
4.See VBA Immediate window for a list of permissions and users.