Protection.AllowFormattingColumns Property (Excel)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

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

expression .AllowFormattingColumns

expression A variable that represents a Protection object.

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

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
Show:
© 2016 Microsoft