Robocopy VBA

rohan8510

New member
Joined
Feb 21, 2015
Messages
6
Reaction score
0
Points
0
hi, i got this code from vba forum by SO but it did not worked on my pc could you please help

i have attached the excel where i have mentioned the details in sheet1 and in sheet2 the screenshot of command prompt. many thanks in advance

Code:
Sub SO()      
    Const Q As String = """" 
    CreateObject("WScript.Shell").Run "CMD /C ROBOCOPY " & Q & Range("A6").Value & Q & " " & Q & Range("C6").Value & Q, False, 0 
     
End Sub
 

Attachments

  • Book111.xls
    158.5 KB · Views: 58
Back
Top