Protection.AllowFormattingRows property (Excel)

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



expression A variable that represents a Protection object.


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


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

Sub ProtectionOptions() 
 ' Allow rows to be formatted on a protected worksheet. 
 If ActiveSheet.Protection.AllowFormattingRows = False Then 
 ActiveSheet.Protect AllowFormattingRows:=True 
 End If 
 MsgBox "Rows can be formatted on this protected worksheet." 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.