title: excel vba - protetcted sheet delete row
body: <p>I learned that I need to write a macro if I want users to delete rows on a protected sheet. </p>
  
  <p>This is the code I got by googling around:  </p>
  
  <pre><code>Sub delete_row()
      ActiveSheet.Unprotect Password:="justme"
          ActiveCell.EntireRow.Delete
      ActiveSheet.Protect Password:="justme"
  End Sub 
  </code></pre>
  
  <p>Where exactly should I place this code? Will it work if multiple rows are deleted etc.?</p>
  
  <p>MrExcel is down today, so limited options. </p>