Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy rows from one Data sheet to another sheet based on cell conte | Excel Discussion (Misc queries) | |||
Auto Copy/autofill Text from sheet to sheet if meets criteria | Excel Discussion (Misc queries) | |||
Copy my active sheet to a new sheet and open with an input form | Excel Programming | |||
relative sheet references ala sheet(-1)!B11 so I can copy a sheet. | Excel Discussion (Misc queries) | |||
providing a sheet-copy event or copy CustomProperties | Excel Programming |