+ Reply to Thread
Results 1 to 4 of 4

How do you move the selection one cell to the right in a macro

  1. #1
    fder
    Guest

    How do you move the selection one cell to the right in a macro

    How do you move the selected cell in any direction from any arbitrary
    position? I'm just using the VB editor.

  2. #2
    Chip Pearson
    Guest

    Re: How do you move the selection one cell to the right in a macro

    See the Offset command. E.g.,

    ActiveCell.Offset(0, 1).Select



    "fder" <fder@discussions.microsoft.com> wrote in message
    news:3812C827-9609-4F32-BC35-F57369DAC0AA@microsoft.com...
    > How do you move the selected cell in any direction from any
    > arbitrary
    > position? I'm just using the VB editor.




  3. #3
    Valued Forum Contributor
    Join Date
    04-11-2006
    Posts
    407
    ActiveCell.Offset(Row, Column).Activate
    EXAMPLES:
    to move the active cell to the right one:
    Activecell.Offset(0,1).Activate

    to move it down one:
    Activecell.Offset(1,0).Activate

    to move it left 2 and up 3:
    Activecell.Offset(-2,-3).Activate

    Quote Originally Posted by fder
    How do you move the selected cell in any direction from any arbitrary
    position? I'm just using the VB editor.

  4. #4
    Chip Pearson
    Guest

    Re: How do you move the selection one cell to the right in a macro

    See the Offset command. E.g.,

    ActiveCell.Offset(0, 1).Select



    "fder" <fder@discussions.microsoft.com> wrote in message
    news:3812C827-9609-4F32-BC35-F57369DAC0AA@microsoft.com...
    > How do you move the selected cell in any direction from any
    > arbitrary
    > position? I'm just using the VB editor.




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1