title: VBA Excel script with locked sheets
body: <p>I have a lot of VBA excel scripts which modifying the cells value. The scripts worked fine until I locked the sheets. After I locked sheets I get this error:
  <a href="http://i.stack.imgur.com/I9QKE.png" rel="nofollow">Click to see image</a></p>
  
  <p>I also read here that there is a way to enable to scripts only to modify cells value, like that:</p>
  
  <pre><code>    For Each Sh In Worksheets
          Sh.Protect Password:="password", UserInterFaceOnly:=True
      Next
  </code></pre>
  
  <p>I locked sheets with this script, but It's working only until I reopen the workbook. After I closed and open again the locks on the sheet is sill active, but gives me the same error message.</p>
  
  <p>What is the best solution to use script with locked sheets?</p>