Shift a cut row up
try this as an alternative:
Sheets("Database").Rows(iSourceRow).Copy
Sheets("archive").Rows(iTgtRow).PasteSpecial xlValues
Sheets("Database").Rows(iSourceRow).Delete
"Risky Dave" wrote in message
...
Hi,
I have some code that cuts a row from one sheet (Database) and pastes it
into another one (Archive):
Dim iSourceRow As Integer
Dim iTgtRow As Integer
Sheets("Database").Range(iSourceRow & ":" & iSourceRow).cut_
Destination:=Sheets("archive").Range(iTgtRow & ":" & iTgtRow)
This works fine except that I cannot get the Database sheet to shift up
all
teh rows below the one that is cut (so that all the data rows are
contiguous). I have tried adding
Shift:= xlUp to the line above, but this generates an "Expected: end of
statement" error
Suggestions on how I can get the rows to move up woould be welcome.
TIA
Dave
|