function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BKBK 

ftp upload

hey ron,

it worked! thank you so much. I have another question


im am trying to create a macro to upload a spreadsheet to an ftp site with a login nad password. I basically recorded a macro of saving to an ftp site that prompted me with a login and password. I also want the macro to not ask me what my login and password is everytime i run the macro. I jsut want it to upload as soon as i Run it. It did do the job while i was creating the macro but when i ran the macro after i created it, it didn't upload the file and gave me an error. Here is my code and my error. Any thoughts??

Run-time error '1004:'
Method 'Saveas' of object '_Workbook' Failed

Sub FTPupload()

Application.WindowState = xlMinimized
ChDir "C:\b_formats"
[COLOR=Yellow] ActiveWorkbook.SaveAs Filename:="ftp://myftp.com/account.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub
[/COLOR]

Ron HessRon Hess
sounds like a cool project, i've never tried saving to a ftp site, however it looks like there is a place for the password in the call to saveAs, did you try to fill this in paramater? in your example it's empty.
BKBK
yeah it's pretty cool...almost gonna get it to work! i tried filling in that parameter but i still get the same error. Is there a login parameter as well?