Test for file on server

W

windsurferLA

I use Excel'97 under WinXP-pro to automatically open a file stored on a
server. The command is:

Workbooks.Open FileName:= _
"ftp://12.34.567.890/public_html/Actions/DownLoad-UploadTest2.xls"

It works find if the file exists, but if not, I get a run time error
1004, and macro stops.

Is there a way to test whether or not the file exists before attempting
to down load the file? The following doesn't work.

If
("'ftp://12.34.567.890/public_html/Actions/DownLoad-UploadTest5.xls'")_
<> "" Then
Workbooks.Open FileName:= _
"ftp://12.34.567.890/public_html/Actions/DownLoad-UploadTest2.xls"
End If
 

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