Results 1 to 8 of 8
  1. #1
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts

    FTP Problem on New PC

    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

    I am using Office 2010 and Windows 7 on both PC's

    I suspect that it may have to do with a Windows 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

  2. #2
    Administrator
    Join Date
    Jun 2010
    Location
    Portugal
    Posts
    12,519
    Thanks
    152
    Thanked 1,398 Times in 1,221 Posts
    Firewall blocking it?

  3. #3
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts

    FTP Problem on New PC

    Thanks for the reply. I have disabled the windows firewall so i'm not sure what else I can do to get the FTP files to download

    Regards

    Howard

  4. #4
    Administrator
    Join Date
    Jun 2010
    Location
    Portugal
    Posts
    12,519
    Thanks
    152
    Thanked 1,398 Times in 1,221 Posts
    Can you ftp without issues if you do it from a command prompt?

  5. #5
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts

    FTP Problem on PC

    Thanks for the reply. I will copy the code into the command prompt when I get into the office this morning & will let you know. My IT dept set up a batch file which FTP's the file. However, when running in Excel, It comes up with a run time error. I now suspect that it may be one of the security settings in Office 2010 that may be causing the problem.

  6. #6
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by ruirib View Post
    Can you ftp without issues if you do it from a command prompt?
    The command prompt works perfectly. I used the following code ftp -n -s:C:\FTP_commands2.txt in the command prompt

    What is the next step in order to get the macro to activate in Excel?

    Your assistance in this regard is most appreciated

    Regards

    Howard

  7. #7
    Administrator
    Join Date
    Jun 2010
    Location
    Portugal
    Posts
    12,519
    Thanks
    152
    Thanked 1,398 Times in 1,221 Posts
    Howard,

    I am sorry, but my knowledge of Excel is not good enough to allow me to answer to that. There are excellent Excel experts that may help with that final step. I hope you can get it done soon.

    Regards

  8. #8
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    Apparently crossposted and solved here.
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •