AllowFormattingRows Property
Returns or sets whether or not rows can resized on a protected worksheet. Set this property to True to enable rows to be resized when the worksheet is protected. The default value is False. Read/write Boolean.
expression.AllowFormattingRows
*expression * Required. An expression that returns a Protection object.
Example
This example locks all cells on Sheet1, and then it enables the user to resize rows and columns, and then protects Sheet1.
Sub Protect_Worksheet()
Dim ptProtSheet1
' Lock all cells on the worksheet.
Spreadsheet1.Worksheets("Sheet1").Cells.Locked = True
Set ptProtSheet1 = Spreadsheet1.Worksheets("Sheet1").Protection
' Allows user to resize rows while Sheet1 is protected.
ptProtSheet1.AllowFormattingRows = True
' Allows user to resize columns while Sheet1 is protected.
ptProtSheet1.AllowFormattingColumns = True
' Protect Sheet1.
ptProtSheet1.Enabled = True
End Sub
Applies to | Protection Object
See Also | AllowFormattingColumns Property