AllowInsertingRows Property
Specifies whether a worksheet row can be inserted when the worksheet has been protected. The default value is False, but this property has no effect if the Enabled property of the Protection object is set to False. Read/write Boolean.
expression.AllowInsertingRows
*expression * Required. An expression that returns a Protection object.
Example
This example locks all cells on Sheet1, and then it enables the insertion and deletion of rows, 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 delete rows while Sheet1 is protected.
ptProtSheet1.AllowDeletingRows = True
' Allows user to insert rows while Sheet1 is protected.
ptProtSheet1.AllowInsertingRows = True
' Protect Sheet1.
ptProtSheet1.Enabled = True
End Sub
Applies to | Protection Object
See Also | AllowDeletingColumns Property | AllowDeletingRows Property | AllowDetails Property | AllowFiltering Property | AllowGrouping Property | AllowInsertingColumns Property | AllowPropertyToolbox Property | AllowSorting Property | Locked Property | Protection Property