title: Google Sheet Script: resetting active cell with getActiveSheet()
body: <p>I'm trying to copy a range of values from a sheet (Test1) and paste them into the active cell of the next sheet (Test2).</p>
  
  <p>The problem I am having is that the active cell keeps getting reset back to A1 instead the last cell I clicked on that page.</p>
  
  <p>When I run the script from the second page (Test2), everything works fine, but I want to be able to run it from sheet Test1 since that is where the data is being copied from and my goal is to have a button to run the script.</p>
  
  <p>With setActiveSheet(Sheet sheet, Bool restoreSelection) - the restoreSelection set to true is supposed to ensure the most recent selection is selected again, but it doesn't seem to be working.</p>
  
  <pre><code>function myFunction() {
    var ss = SpreadsheetApp.getActive();
    var s1 = ss.getSheetByName('Test1');
    var s2 = ss.getSheetByName('Test2');
    var r1 = s1.getRange('A7:A19');
    ss.setActiveSheet(s2, true);
    var activeCell = s2.getActiveCell();
  r1.copyTo(activeCell,SpreadsheetApp.CopyPasteType.PASTE_VALUES,true);
  }
  </code></pre>