Share via


AllowFormattingColumns Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Returns True if the formatting of columns is allowed on a protected worksheet. Read-only Boolean.

expression.AllowFormattingColumns

expression   Required. An expression that returns a Protection object.

Remarks

The AllowFormattingColumns property can be set by using the Protect method arguments.

Example

This example allows the user to format columns on the protected worksheet and notifies the user.

  Sub ProtectionOptions()

    ActiveSheet.Unprotect

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

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

End Sub