SaveAs method fails when saving to FTP site.

S

Steve Brennan

If you manually save a file to an FTP site in Excel, you
get the FTP log on dialog where you are prompted for
username and password to log into the FTP site...

How do you log on to the FTP site using Visual Basic so
the SaveAs method doesn't fail, since there is no argument
for providing the username & password required to access
the FTP site?

Thanks,

Steve Brennan
 
S

Steve Brennan

Robin,

Thanks for the reply! The SaveAs method fails, and the
Open method doesn't pass the UserID and Password, but I
used it like this:

On Error Resume Next
Workbooks.Open Filename:= _
"ftp://UserID:p[email protected]/bogusfile.xls"

This does force the FTP Log On dialog, and after the user
enters the username and password, it attempts to open a
non-existent file on the FTP server...it errors, but
the "On Error Resume Next" ignores the error and the
procedure continues to run. The SaveAs method then works
because the user has logged in to the FTP site.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top