Name

workbook.ProtectStructure

Synopsis

Returns True if the order of the sheets in the workbook is protected, False if not. The following code displays the workbook’s protection settings in the Immediate window:

    Set wb = ThisWorkbook
    Debug.Print "Structure protected? " & wb.ProtectStructure, _
      "Windows protected? " & wb.ProtectWindows

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.