Why repeat the last Excel sheet row twice
the code is good
but repeat the last row
how to prevent from pasting the last row twice
the code is good
but repeat the last row
how to prevent from pasting the last row twice
Code:
For i = 0 To listSearch.ListCount
If listSearch.Selected(i) = True Then
ActiveWorkbook.Sheets("Database").Activate
Rows(listSearch.List(i, 0)).Copy
ActiveWorkbook.Sheets("Report").Activate
LastRow = Worksheets("Report").Range("C" & Rows.Count).End(xlUp).Row + 1
ActiveWorkbook.Sheets("Report").Rows(LastRow).PasteSpecial xlPasteValues
ActiveWorkbook.Sheets("Start").Activate
End If
Next i