Hello, I am trying to create a code that will copy and paste the results of an array from a search function onto a worksheet. However, I am getting an 'overflow' error when I try to use a copy/paste code that has worked for me in the past. Can someone please help me figure out why this paste function crashes when it gets to the last line of 'ActiveSheet.Paste'?
Code:
For i1 = LBound(Results1) To UBound(Results1)
Set p1results = Range(Results1(i1))
Range("D" & p1results.Value & ":P" & p1results.Value).Copy
Sheets("SearchResult").Select
NextRow = Range("D65536").End(xlUp).Row + 1
Cells(NextRow, 1).Select
ActiveSheet.Paste
Next i1