title: How to hide and unhide rows on protected sheet, without error 1004?
body: <p>I'm getting <code>error 1004</code> when hiding and unhiding rows on a sheet.</p>
  
  <p>This sheet is protected but does allow the user to format rows which allows the user to hide and unhide rows. </p>
  
  <p>Although the code does work, it gives an <code>error 1004</code> telling me the sheet is protected which I need to get rid of. I believe the issue is because I'm selecting the cells I want to hide/unhide. How do I just hide/unhide the cell range? </p>
  
  <pre><code>Sub Show_menu()
      Rows("20:20").Select
      Rows("20:44").Select
      Selection.EntireRow.Hidden = False
      Rows("45:45").Select
      Rows("45:128").Select
      Selection.EntireRow.Hidden = True
  End Sub
  </code></pre>