Avatar of RWayneH
RWayneH
Flag for United States of America

asked on 

Shift Rows Down, after copying from one sheet to another

I am using the following script to move a row from one sheet to another.

Sub CopyRws()

Dim rng As Range
Dim intCols As Integer
Dim introw As Integer

Set rng = ActiveCell.CurrentRegion
intCols = rng.Columns.Count
introw = ActiveCell.Row

Range(Cells(introw, 1), Cells(introw, intCols)).Copy

Sheets("LogArchived").Select
Range("A7").PasteSpecial xlPasteAll

Sheets("TaskTracker").Select
Range(Cells(introw, 1), Cells(introw, intCols)).Delete xlShiftUp

Set rng = Nothing

End Sub

Open in new window


Issue is in Ln14, it overwrites what is there in the destination sheet (LogArchived) in A7.  How do I change this so it inserts and pushes what is on LogArchived sheet down at A7?  It would be great if I could select more than one row on the Target sheet (TaskTracker) in shift down however many rows were selected.  This way I could do more than one row at a time.   Please advise and thanks.
Microsoft ExcelVB Script

Avatar of undefined
Last Comment
Subodh Tiwari (Neeraj)

8/22/2022 - Mon