title: selecting a cell in LibreOffice Calc
body: <p>So I have a macro to clear some cells <code>A2-A250</code> but I want to return to cell <code>A1</code> once I have finished </p>
  
  <pre><code>Sub reset
  Dim oActiveSheet As Variant
  Dim oCellRangeByName As Variant
  
  oActiveSheet = ThisComponent.getCurrentController().getActiveSheet()
  
  oCellRangeByName = oActiveSheet.getCellRangeByName("A1:A250")
  
  oCellRangeByName.clearContents(7)
  End Sub
  </code></pre>