title: Insert rows in a protected worksheet in excel 2010
body: <p>I want to insert rows in a protected worksheet.  I am using the following code in ThisWorkbook code window, but it is not working.  Can someone please help me?</p>
  
  <pre><code>Private Sub workbook_Open()
  
      With Worksheets("Sheet1")
          .Protect Password:="vba2014", UserInterFaceOnly:=True, AllowInsertingRows:=True
          .EnableOutlining = True
      End With
  
  End Sub
  </code></pre>