Can you explain why you want to use vba and not a formula that would automatically update? (Just trying to understand your circumstances)
I'm not familiar with barcode scanning to Excel but see if this Worksheet_Change event code does what you want.
To implement ..
1. Right click the sheet name tab and choose "View Code".
2. Copy and Paste the code below into the main right hand pane that opens at step 1.
3. Close the Visual Basic window & test. by scanning a new barcode.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1")) Is Nothing Then
Application.EnableEvents = False
Intersect(ActiveSheet.UsedRange, Rows(5)).ClearContents
If Range("A2").Value = "On list" Then
Sheets("Page 1").Columns("A").Find(What:=Range("A1").Value, LookAt:=xlWhole).EntireRow.Copy Destination:=Range("A5")
End If
Application.EnableEvents = True
End If
End Sub