I had a code that will copy whole folder from A location to B location, but there is a error on the status. I need some help.
Dim FSO As Object
Dim strFromFolder As String
Dim strToFolder As String
Dim lr As Long
Set FSO = CreateObject("scripting.filesystemobject")
lr = Cells(Rows.Count, "A").End(xlUp).Row
For X = 2 To lr
strFromFolder = Range("A" & X).Value
strToFolder = Range("B" & X).Value
'get project id
Source:=strFromFolder, Destination:=strToFolder, overwritefiles:=True
On Error GoTo 0
If Err.Number <> 0 Then
Range("C" & X).Value = "Copy error"
Range("C" & X).Value = "Success"