stillwillyboy
Technical User
I keep getting error messages when I try to copy a file from one folder to another. Here is my code:
Sub SendFileToADPFolder()
Application.DisplayAlerts = False
Dim SourceFile, DestinationFile
' Define source file name. 'note there is a space b/w
' the words "Microsoft" and "Office"
SourceFile = "C:\Program Files\Microsoft Office\Excel\OutsourceXfer\PRVY6EPI.csv"
' Define target file name.
DestinationFile = "C:\Program Files\Microsoft Office\Excel\OutsourceXfer\FakeADPFolder\"
‘’I tried the following and got the Path Not Found error
'FileCopy SourceFile, DestinationFile ' Copy source to target.
‘when I tried the following, I got “object required”
SourceFile.Copy DestinationFile
End Sub
TIA,
Bill
Sub SendFileToADPFolder()
Application.DisplayAlerts = False
Dim SourceFile, DestinationFile
' Define source file name. 'note there is a space b/w
' the words "Microsoft" and "Office"
SourceFile = "C:\Program Files\Microsoft Office\Excel\OutsourceXfer\PRVY6EPI.csv"
' Define target file name.
DestinationFile = "C:\Program Files\Microsoft Office\Excel\OutsourceXfer\FakeADPFolder\"
‘’I tried the following and got the Path Not Found error
'FileCopy SourceFile, DestinationFile ' Copy source to target.
‘when I tried the following, I got “object required”
SourceFile.Copy DestinationFile
End Sub
TIA,
Bill