How to get this work?
VBA Code:
Sub CopyFolders()
Dim FSO As Object
Dim OldFolder As String, NewFolder As String
OldFolder = Range("A" & i).Value
NewFolder = Range("B" & i).Value
Set FSO = CreateObject("Scripting.FileSystemObject")
For i = 7 To Range("A" & Rows.Count).End(xlUp).Row
If FSO.FolderExists(OldFolder & Cells(i, 1).Value) Then
FSO.CopyFolder OldFolder & Cells(i, 1).Value, NewFolder & Cells(i, 1).Value, True
End If
Next i
Set FSO = Nothing
MsgBox "Copy Complete"
End Sub