TypeError: Cannot call method "getRange" of null. (line 0)
<p>I keep getting this error when I try and run this script. It has ran just fine for several days. It is in google docs spreadsheet.</p>

<p>TypeError: Cannot call method "getRange" of null. (line 0)</p>

<pre><code>ss = SpreadsheetApp.getActiveSpreadsheet();


function onOpen() {
 var ss = SpreadsheetApp.getActiveSpreadsheet();
  var menuEntries = [ {name: "New PO", functionName: "NewPO"}];
   ss.addMenu("New PO", menuEntries);
 }


function NewPO() {
  SpreadsheetApp.getActiveSheet().insertRowsBefore(1,6);


  // Adjust this range accordingly, these are the cells that will be
  // copied.  Format is getRange(startRow, startCol, numRows, numCols)
  ss.getSheetByName("PO Form").getRange(1, 1, 6, 8)
  .copyTo(SpreadsheetApp.getActiveSheet().getRange(1, 1, 6, 8));
   }


function onEdit(e) {
  var ss = e.source.getActiveSheet();
  var r = e.source.getActiveRange();
  // 1 is A, 2 is B, ... 8 is H
  if (r.getColumn() == 8 &amp;&amp; r.getValue() == "x") {
    r.setValue(Utilities.formatDate(new Date(), "GMT", "yyyy-MM-dd"));
  }
}
</code></pre>

<p>Is there anything you can see that would cause this error?
​</p>
