+ Reply to Thread
Results 1 to 6 of 6

In VB macro how do I select range from active cell

  1. #1
    Registered User
    Join Date
    10-29-2005
    Posts
    16

    In VB macro how do I select range from active cell

    Hey guys and gals, Thanks for lookin at this problemmmmm???

    When I am writing a macro using visual basic, how do I select a range which includes 2 rows down and 8 rows across (selects the range not just the single cell) from the currently selected/active cell then copy it: All this starts from the cell the user starts from.
    Example......

    PuzzeledProgramer

  2. #2
    Andrea Jones
    Guest

    RE: In VB macro how do I select range from active cell

    ActiveCell.Range("A1:H2").Select

    Andrea Jones
    www.allaboutoffice.co.uk
    www.allaboutclait.com

    "spydor" wrote:

    >
    > Hey guys and gals, Thanks for lookin at this problemmmmm???
    >
    > When I am writing a macro using visual basic, how do I select a range
    > which includes 2 rows down and 8 rows across (selects the range not
    > just the single cell) from the currently selected/active cell then
    > copy it: All this starts from the cell the user starts from.
    > Example......
    >
    > PuzzeledProgramer
    >
    >
    > --
    > spydor
    > ------------------------------------------------------------------------
    > spydor's Profile: http://www.excelforum.com/member.php...o&userid=28438
    > View this thread: http://www.excelforum.com/showthread...hreadid=496798
    >
    >


  3. #3
    Bob Phillips
    Guest

    Re: In VB macro how do I select range from active cell

    Activecell.Resize(2,8).Select

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "spydor" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hey guys and gals, Thanks for lookin at this problemmmmm???
    >
    > When I am writing a macro using visual basic, how do I select a range
    > which includes 2 rows down and 8 rows across (selects the range not
    > just the single cell) from the currently selected/active cell then
    > copy it: All this starts from the cell the user starts from.
    > Example......
    >
    > PuzzeledProgramer
    >
    >
    > --
    > spydor
    > ------------------------------------------------------------------------
    > spydor's Profile:

    http://www.excelforum.com/member.php...o&userid=28438
    > View this thread: http://www.excelforum.com/showthread...hreadid=496798
    >




  4. #4
    Registered User
    Join Date
    10-29-2005
    Posts
    16

    Talking Thanks Bob

    Bob...

    Sweeeeet!! This is a nice solution to "ShouldBeSimple" thing to find with the Excel Help menus.

    Sure Appreciate the Info.........

    Spydor

  5. #5
    Gord Dibben
    Guest

    Re: In VB macro how do I select range from active cell

    When in VB Editor check out help on "resize"



    Gord Dibben Excel MVP

    On Thu, 29 Dec 2005 16:33:47 -0600, spydor
    <[email protected]> wrote:

    >
    >Bob...
    >
    >Sweeeeet!! This is a nice solution to "ShouldBeSimple" thing to find
    >with the Excel Help menus.
    >
    >Sure Appreciate the Info.........
    >
    >Spydor



  6. #6
    Bob Phillips
    Guest

    Re: In VB macro how do I select range from active cell

    Andrea's solution is very similar, it is just perhaps not so obvious that
    Range("A1:H2") refers to 2 rows and 8 columns from the actrivcell, it does
    not refer to the actual range A1:H2.

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "spydor" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Bob...
    >
    > Sweeeeet!! This is a nice solution to "ShouldBeSimple" thing to find
    > with the Excel Help menus.
    >
    > Sure Appreciate the Info.........
    >
    > Spydor
    >
    >
    > --
    > spydor
    > ------------------------------------------------------------------------
    > spydor's Profile:

    http://www.excelforum.com/member.php...o&userid=28438
    > View this thread: http://www.excelforum.com/showthread...hreadid=496798
    >




+ 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