afgg
06-08-2016, 03:10 PM
I have a folder called 'productions' inside a folder, but when I click on the button to copy .pdf from the source, the files don't get copied inside the productions folder, instead it gets copied to the Parent folder.
in other words, the code works until the comboBox3, but fails to move one step forward and copy the pdf's inside the productions folder.
Private Sub CommandButton8_Click() ' PDF buttons
On Error GoTo er:
Dim FSO As Object
Set FSO = CreateObject("scripting.filesystemobject")
FSO.CopyFile "C:\Users\XXXX\Desktop\Changes\*.PDF", "S:\PDF_Jobs\" & ComboBox1 & "\" & ComboBox2 & "\" & ComboBox3 & "\" & Productions, False
MsgBox "Files Copied"
Exit Sub
er: MsgBox "Files already exists"
End Sub
thanks
in other words, the code works until the comboBox3, but fails to move one step forward and copy the pdf's inside the productions folder.
Private Sub CommandButton8_Click() ' PDF buttons
On Error GoTo er:
Dim FSO As Object
Set FSO = CreateObject("scripting.filesystemobject")
FSO.CopyFile "C:\Users\XXXX\Desktop\Changes\*.PDF", "S:\PDF_Jobs\" & ComboBox1 & "\" & ComboBox2 & "\" & ComboBox3 & "\" & Productions, False
MsgBox "Files Copied"
Exit Sub
er: MsgBox "Files already exists"
End Sub
thanks