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
Bookmarks