+ Reply to Thread
Results 1 to 3 of 3

Copy row from one sheet to another

  1. #1
    davegb
    Guest

    Copy row from one sheet to another

    I'm writing a macro that finds a text string in one spreadsheet
    (wsExtFrom), then copies that entire row to another sheet (wsExtrTo) in
    the same workbook. It copies to row lExt2Row. I can't seem to get the
    syntax right.

    lCopyRow = rFndCell.Row
    Set rCopy = wsExtFrom.Cells(lCopyRow, lCopyRow)

    rCopy.Copy Destination:=wsExtrTo.Rows(lExtr2Row)
    lExtr2Row = lExtr2Row + 1

    Can anyone help me fix this mess?
    Thanks again!


  2. #2
    Tom Ogilvy
    Guest

    RE: Copy row from one sheet to another

    lCopyRow = rFndCell.Row
    Set rCopy = wsExtFrom.rows(lCopyRow)

    rCopy.Copy Destination:=wsExtrTo.Rows(lExtr2Row)
    lExtr2Row = lExtr2Row + 1

    --
    Regards,
    Tom Ogilvy


    "davegb" wrote:

    > I'm writing a macro that finds a text string in one spreadsheet
    > (wsExtFrom), then copies that entire row to another sheet (wsExtrTo) in
    > the same workbook. It copies to row lExt2Row. I can't seem to get the
    > syntax right.
    >
    > lCopyRow = rFndCell.Row
    > Set rCopy = wsExtFrom.Cells(lCopyRow, lCopyRow)
    >
    > rCopy.Copy Destination:=wsExtrTo.Rows(lExtr2Row)
    > lExtr2Row = lExtr2Row + 1
    >
    > Can anyone help me fix this mess?
    > Thanks again!
    >
    >


  3. #3
    davegb
    Guest

    Re: Copy row from one sheet to another


    Tom Ogilvy wrote:
    > lCopyRow = rFndCell.Row
    > Set rCopy = wsExtFrom.rows(lCopyRow)
    >
    > rCopy.Copy Destination:=wsExtrTo.Rows(lExtr2Row)
    > lExtr2Row = lExtr2Row + 1
    >
    > --
    > Regards,
    > Tom Ogilvy
    >


    Thanks, Tom! At least I was close this time...

    >
    > "davegb" wrote:
    >
    > > I'm writing a macro that finds a text string in one spreadsheet
    > > (wsExtFrom), then copies that entire row to another sheet (wsExtrTo) in
    > > the same workbook. It copies to row lExt2Row. I can't seem to get the
    > > syntax right.
    > >
    > > lCopyRow = rFndCell.Row
    > > Set rCopy = wsExtFrom.Cells(lCopyRow, lCopyRow)
    > >
    > > rCopy.Copy Destination:=wsExtrTo.Rows(lExtr2Row)
    > > lExtr2Row = lExtr2Row + 1
    > >
    > > Can anyone help me fix this mess?
    > > Thanks again!
    > >
    > >



+ 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