Error within the code – Copying Folder to another destination

Hi Guys,


Please assist…


The code given has an error:

Sub sbCopyingAFolder()
Dim sFolder As String, dFolder As String
sFolder = ” C:\Users\vivek.budhram\Documents\” ‘ Project_Scenarios_3
dFolder = ” Z:\Div Finance Reporting\Forecast\2019\Forecast1\Round 2\Subscribers\” ‘ Scenarios
Set FSO = CreateObject(“Scripting.FileSystemObject”)
If Not FSO.FolderExists(dFolder) Then
FSO.CopyFolder sFolder, dFolder  <<<<- “Error”
MsgBox “Folder Copied Successfully to The Destination”, vbExclamation, “Done!”
MsgBox “Folder Already Exists in the Destination”, vbExclamation, “Folder Already Exists!”
End If
End Sub

When I run the code the FSO.CopyFolder line doesnt allow for the code to process the work.

Error within the code - Copying Folder to another destination

Please advise


Thank you

Top Contributor Asked 5 days ago in VBA: Macros.
Add Comment
1 Answer(s)

Path not found, but the folders do exist

Top Contributor Answered 5 days ago.
Add Comment
  • Found this useful?

    Please share using the share button above.

    If you found the answer is best answer for your question, Please mark as 'best answer' by clicking on the right tick mark icon at the left side of the answer.

    Found the answer useful and wants to credit the user, then vote the answer (vote up).

  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.