+ Reply to Thread
Results 1 to 4 of 4

copying rows from next sheet over

  1. #1
    Registered User
    Join Date
    05-24-2004
    Posts
    16

    copying rows from next sheet over

    I'm trying to copy a range of rows from one sheet over from the active sheet, and paste them onto another sheet.

    This is what I tried:

    ActiveSheet.Next.Range("a2:b100").select
    selection.copy

    However, I'm getting the error "selection method of the range class failed"
    What am I doing wrong, and is there an alternative way to do this?

    Any help would be appreciated!

  2. #2
    Don Guillett
    Guest

    Re: copying rows from next sheet over

    try
    Sheets(ActiveSheet.Index + 1).Range("a2:b100").Copy

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "ayl322" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I'm trying to copy a range of rows from one sheet over from the active
    > sheet, and paste them onto another sheet.
    >
    > This is what I tried:
    >
    > ActiveSheet.Next.Range("a2:b100").select
    > selection.copy
    >
    > However, I'm getting the error "selection method of the range class
    > failed"
    > What am I doing wrong, and is there an alternative way to do this?
    >
    > Any help would be appreciated!
    >
    >
    > --
    > ayl322
    > ------------------------------------------------------------------------
    > ayl322's Profile:
    > http://www.excelforum.com/member.php...fo&userid=9846
    > View this thread: http://www.excelforum.com/showthread...hreadid=487235
    >




  3. #3
    Registered User
    Join Date
    05-24-2004
    Posts
    16
    it works beautifully! thank you~

  4. #4
    Don Guillett
    Guest

    Re: copying rows from next sheet over

    I probably should have added that you do not need to do any selections. This
    line will work by itself from the destination sheet.

    sub copyit()'all you need

    Sheets(ActiveSheet.Index + 1).Range("a2:b100").Copy range("a1")
    end sub



    --
    Don Guillett
    SalesAid Software
    [email protected]
    "ayl322" <[email protected]> wrote in
    message news:[email protected]...
    >
    > it works beautifully! thank you~
    >
    >
    > --
    > ayl322
    > ------------------------------------------------------------------------
    > ayl322's Profile:
    > http://www.excelforum.com/member.php...fo&userid=9846
    > View this thread: http://www.excelforum.com/showthread...hreadid=487235
    >




+ 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