title: Use VBA in Excel 2013 to mimic moving using arrow keys
body: <p>I want to create a VBA macro for Excel 2013 to move the cursor. I am simply re-mapping keyboard shortcuts, e.g. I want to move the cursor down using CTRL+J instead of the down arrow. So I don't need anything fancy, just a simple cursor move. I also want to do this in VBA, so I'm not looking for, e.g., an Excel plugin or add-in or anything like that.</p>
  
  <p>If, under the "Developer" tab, I select "Use Relative References", and then simply record a macro moving the cursor down, I get the following, which <em>does</em> move the cursor:</p>
  
  <pre><code>ActiveCell.Offset(1, 0).Range("A1").Select
  </code></pre>
  
  <p>However, this is not a complete mimic of the down arrow. This subroutine/macro will move into hidden rows, which I do not want.</p>
  
  <p>Each of the following give me an "Object doesn't support this property or method" error:</p>
  
  <pre><code>Selection.MoveDown Unit:=xlCell, Count:=1, Extend:=xlMove
  ...
  Selection.MoveDown Unit:=xlWorksheetCell, Count:=1, Extend:=xlMove
  ...
  Selection.MoveDown xlCell, 1, xlMove
  ...
  Selection.MoveDown xlWorksheetCell, 1, xlMove
  </code></pre>
  
  <p>The following gives me a syntax error:</p>
  
  <pre><code>Selection.MoveDown(xlWorksheetCell, 1, xlMove)
  </code></pre>
  
  <p>I can imagine a moderatelymacro that moves the cursor, checks whether the new cell is hidden and, if so, repeats until it is not. However, I have a hard time believing that there isn't a command/method/etc that doesn't simply and easily mimic moving the cursor the way the arrow key does,ignoring hidden rows/columns. For example, I <em>can</em> mimic using the arrow keys while holding down the control key using, g., <code>Selection.End(xlDown).Select</code>. So I want to just mimic moving the cursor with an arrow key as simply as possible.</p>
  
  <p><em>(This seems like such a simple problem that I'm guessing someone has asked/answered this before. However, if so, and if you mark my question as a duplicate, please indicate where the original answer is, as I've looked and can't find it.)</em></p>