CTRL - Arrow Down
Power Query Course in Spanish
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: CTRL - Arrow Down

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    England
    Posts
    212
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Is there code which replicates these keystrokes, as I'm trying to select a particular range, starting from an activecell. Also, is there code for CTRL and the other arrown directions?

    thanks

    Matt

  2. #2
    Guest

    Default

    Yes.

    Activecell.End(xlDown).select
    xldown can be replaced with Toleft or Toright or Up

    James

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    England
    Posts
    212
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks James

    Do you have any ideas why the following code is not working. Obviously, I'm doing something completely wrong but cannot work out what.

    Set myrange = Worksheets("Sheet3").Range(ActiveCell, Worksheets("Sheet3").ActiveCell.End(xlDown).Offset(0, 2))

  4. #4
    MrExcel MVP Barrie Davidson's Avatar
    Join Date
    Feb 2002
    Location
    Winnipeg
    Posts
    2,330
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-03-12 05:02, Matt wrote:
    Thanks James

    Do you have any ideas why the following code is not working. Obviously, I'm doing something completely wrong but cannot work out what.

    Set myrange = Worksheets("Sheet3").Range(ActiveCell, Worksheets("Sheet3").ActiveCell.End(xlDown).Offset(0, 2))
    Try this (you need the "Address" portion in your Range statement):

    Set myrange = Worksheets("Sheet3"). _
    Range(ActiveCell.Address, Worksheets("Sheet3"). _
    ActiveCell.End(xlDown).Offset(0, 2).Address)

    Regards,
    Barrie Davidson

    "You're only given a little spark of madness. You mustn't lose it." - Robin Williams

  5. #5
    Guest

    Default

    Set myrange = Worksheets("Sheet3").Range(ActiveCell, ActiveCell.End(xlDown).Offset(0, 2))

  6. #6
    Board Regular
    Join Date
    Feb 2002
    Location
    England
    Posts
    212
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Thanks for your help guys

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com