Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 573
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 573
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy rows from one Data sheet to another sheet based on cell conte John McKeon Excel Discussion (Misc queries) 2 May 15th 10 06:49 AM
Auto Copy/autofill Text from sheet to sheet if meets criteria Joyce Excel Discussion (Misc queries) 0 November 20th 08 11:05 PM
Copy my active sheet to a new sheet and open with an input form Brad Withrow Excel Programming 0 April 6th 06 03:56 AM
relative sheet references ala sheet(-1)!B11 so I can copy a sheet. RonMc5 Excel Discussion (Misc queries) 9 February 3rd 05 12:51 AM
providing a sheet-copy event or copy CustomProperties Carlos Cortes Excel Programming 2 November 11th 04 08:24 AM


All times are GMT +1. The time now is 03:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"