title: What causes Error 70 in Excel VBA?
body: <p>I have some code which keeps causing an</p>
  
  <pre><code>Error 70: Permission Denied
  </code></pre>
  
  <p>in my VBA code.  I can't work out why, because I know that the worksheet is unprotected and that I can make changes to it.  The code in question is</p>
  
  <pre><code>sh.Name = "square"
  </code></pre>
  
  <p>It attempts to rename a shape that has been copied from another sheet and pasted into the sheet - there are no other shapes in the sheet with that name, because prior to these code I have already deleted all shapes with that name.</p>
  
  <p>Any suggestion as to what might cause this permissions error?</p>