Enabled Property Example

This example prevents a user from inserting rows on the active worksheet.

Set pt = Spreadsheet1.ActiveSheet.Protection
pt.AllowInsertingRows = False
pt.Enabled = True