The code is finding the row based on input but not copying it back to my workbook.
Code asks User for the Workbook name to check for line match to the user import. I need to find the row and based on Col A and copy the row to my Workbook. I don't get an error but it not copying the row back
Sub Macro1()
Dim wb As Workbook
Dim ws As Worksheet
Dim myValue As Variant
With Application.FileDialog(msoFileDialogFilePicker)
.Filters.Add "Excel Files", "*.xlsx; *.xlsm; *.xls; *.xlsb", 1
.Show
fullpath = .SelectedItems.Item(1)
End With
If InStr(fullpath, ".xls") = 0 Then
Exit Sub
End If
Workbooks.Open fullpath
Set wb = ActiveWorkbook
wb.Activate
myValue = InputBox("Enter Value to lookup")
wb.Activate
RowCount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
For i = 1 To RowCount
Range("a" & i).Select
check_value = ActiveCell
If check_value = myValue Then
ActiveCell.EntireRow.Copy
RowCount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
Range("a" & RowCount + 1).Select
Sheets("Sheet2").Paste
Workbooks("wip - copy.xlsm").Activate
Sheets("Sheet2").Paste
End If
Next
Workbooks("wip - copy.xlsm").Activate
Sheets("Sheet2").Select
End Sub