Friday 7 February 2014

AllowFormattingCells Property [Excel 2003 VBA Language Reference]

Sub ProtectionOptions()

    ActiveSheet.Unprotect

    ' Allow cells to be formatted on a protected worksheet.
    If ActiveSheet.Protection.AllowFormattingCells = False Then
        ActiveSheet.Protect AllowFormattingCells:=True
    End If

    MsgBox "Cells can be formatted on this protected worksheet."

End Sub