Range Selection with Arrows Keys

  • Thread starter Thread starter Michael Kintner
  • Start date Start date
M

Michael Kintner

I was trying to record a selection using the arrow keys. Suchs as:

Start at Cell A1
Hold Shift end, Hit end, Hit Arrow Down, Hit end, Hit Arrow Down
Then hit End and right arrow twice.

How do I do this with VB code. I can not find anyting in help.

Thanks in advance for any help!!!

Mike
 
The method is to use from help is

Returns a Range object that represents the cell at the end of th
region that contains the source range. Equivalent to pressing END+U
ARROW, END+
DOWN ARROW, END+LEFT ARROW, or END+RIGHT ARROW. Read-only.

Syntax

expression.End(Direction)

expression Required. An expression that returns a Range object.

Direction Required Long. The direction in which to move. Can be on
of the following XlDirection constants: xlToLeft, xlToRight, xlUp, o
xlDown
 
Back
Top