Currently doing the last bits of VBA on a macro. This macro is intented to via an Inputbox using Findstring, finding a row, copying it to a different worksheet, paste this row on the first empty row, and delete the row on the original worksheet.
If Not Rng Is Nothing Then
Rng.EntireRow.Copy
Worksheets("ScrapLogboek").Cells(Rows.Count, "A").End(xlUp).Offset(1, -1)
Worksheets("ScrapLogboek").Range("A2").PasteSpecial
Rng.EntireRow.Delete
Else
MsgBox ("Niks gescrapt. Check of het B-nummer correct is.")
End If
End With
MsgBox ("Logboek gescrapt.")
End If
End Sub
Now i keep getting a synthaxis-error on the Offset-function. What am i doing wrong? As said in the comments; Worksheets("ScrapLogboek").Cells(Rows.Count, "A").End(xlUp).Offset(1, -1). This line is giving me shit, for some reason.
End With
andEnd If
with no starting condition. Which line is it failing on? What is wrong? – Tom