Name

permission.Enabled [= setting]

Synopsis

Sets or returns whether permissions are currently enforced. Setting Enabled to False sets the workbook’s user count to zero, but does not remove those users from the permissions list. For example, the following code temporarily disables permissions:

    Set irm = ThisWorkbook.Permission
    irm.Enabled = False

and this code re-enables permissions as they were set before the preceding code ran:

    irm.Enabled = True

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.