Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Jun 2001
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excel Macro (XP)

    Does anyone know how to write a macro that will always beginning at the active cell, select a certain # of cells below it? Thanks,

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel Macro (XP)

    The code below will select the ActiveCell and the five cells below it:

    <code>
    Range(ActiveCell, ActiveCell.Offset(5, 0)).Select
    </code>
    Legare Coleman

  3. #3
    Star Lounger
    Join Date
    Jun 2001
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel Macro (XP)

    Beautiful!! Thanks so much

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel Macro (XP)

    I would like to add that it is almost never necessary to select cells in VBA to work with them, and if it is not necessary it is always a bad idea and very inefficient.
    Legare Coleman

Posting Permissions

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