I have the following FTP code which works perfectly on my one PC at the office. I have just been given a new PC and when running the macro run time error 440 "unable to wait for process"
The following code is highlighted
wsh.Run FTPcommand, 5, True
However, when setting up a batch ccommand and running this, the file is downloaded
I am using Office 2010 and Windows 7 on both PC's
I suspect that it may have to do with a Windows permission setting of some sort.
Your assistance in resolving the problem will be most appreciated
Public Sub Ftp_Download_File()
Dim FTPcommand As String
Dim wsh As Object
FTPcommand = "ftp -n -s:" & Chr(34) & "C:\FTP_commands2.txt" & Chr(34)
Set wsh = CreateObject("WScript.Shell")
wsh.Run FTPcommand, 5, True
End Sub