Right now I am building a Macro which can be found underneath. The red code is not working right now and I am looking for alternatives to solve this error but until now I haven't found none.
Basically, I am looking for a correct code to copy files from a sheet to another sheet with a find macro.
Code
Sub vinden()
Dim FindString As String
Dim Rng As Range
FindString = Range("A21")
If Trim(FindString) <> "" Then
With Sheets("Voorraadverloop").Range("A1:IV65536")
Set Rng = .Find(What:=FindString, _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
Application.Goto Rng, True
[COLOR="Red"] LR = Worksheets("Voorraadverloop").Cells(Rows.Count, 1).End(xlUp).Row + 2
With Sheets("Voorraadscherm")
.Cells(LR, 1) = Sheets("Voorraadscherm").Cells(4, 1)
.Cells(LR, 3) = Sheets("Voorraadscherm").Cells(4, 3)
.Cells(LR, 5) = Sheets("Voorraadscherm").Cells(4, 5)[/COLOR]
End With
Else
MsgBox "Nothing found"
End If
End With
End If
End Sub
Display More