title: VBA for Excel, On press of enter key move in specific direction for a set range of cells in a column
body: <p>I need VBA code for Excel that will allow me to capture the enter key in a specific column and instead of moving down one row (default for rest of workbook) on enter, remain in the same cell or return to same cell.</p>
  <pre><code>Public Sub MyCode()
  
  ActiveCell.Offset(-1, 0).Select
  
  End Sub
  
  Private Sub Worksheet_Activate()
  
  With ThisWorkbook.Sheets(&quot;REQUEST FORM&quot;)
  
  Application.OnKey &quot;~&quot;, &quot;MyCode&quot;
  
  End Sub
  </code></pre>
  <p>In addition, it cannot affect any other open workbooks.</p>