Results 1 to 1 of 1

Save a workbook to an FTP site?

Threaded View

  1. #1
    Registered User
    Join Date
    06-15-2010
    Location
    Bradford, England
    MS-Off Ver
    Excel 2007
    Posts
    1

    Question Save a workbook to an FTP site?

    Morning,

    At work we have been using vba within excel to save documents to a central FTP site for years. Lately we been having trouble getting the file to save to the FTP successfully.

    We are getting a message when we click on the upload button on the workbook saying "Runtime Error 1004 Method SaveAs of object _workbook failed"?

    It seems to work ok on some computers especially those running Excel 2007 but on Excel 2002/2003 we have started to get this error message?

    Any ideas?

    Many thanks
    Martyn


    vba code:
    
    Sub Submit()
    
        Dim Aname As String
        Application.DisplayAlerts = False
        Application.ScreenUpdating = False
        Application.Run Macro:="Save"
        Const Title1$ = "Send to Head Office"
        Sheets("menu").Select
        Aname = Range("Filename")
        ActiveWorkbook.SaveAs Filename:="ftp://path/" & Aname & ".xls", _
                              FileFormat:=xlnormal, Password:="", WriteResPassword:="", _
                              ReadOnlyRecommended:=False, CreateBackup:=False
        Sheets("Menu").Select
        Range("A1").Select
        MsgBox "THE FILE HAS BEEN SENT TO HEAD OFFICE"
        Application.Run Macro:="Auto_close"
        Application.Run Macro:="Closedown"
        Application.ScreenUpdating = True
    End Sub
    Last edited by pike; 06-15-2010 at 04:21 AM. Reason: Code Tags added for Newbie PM Message

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1