Test FTP Connection

G

Grant

How can I test to make sure my FTP connection is connected before I execute
my code.

Thanks
Grant


ActiveWorkbook.SaveAs Filename:= _
"ftp://123.456.7.89/path/invoice.dat", FileFormat:=xlTextPrinter _
, CreateBackup:=False
 
S

Sami Askar

I use an ActiveX control from http://www.chilkatsoft.com/

Set chilkatFTP = CreateObject("ChilkatFTP.ChilkatFTP")

'FTP Parameters
chilkatFTP.Hostname = hostip
chilkatFTP.UserName = username
chilkatFTP.Password = password

'Connect
chilkatFTP.Connect

'Was the connection successful?
If chilkatFTP.IsConnected Then
'DO SOMETHING
Else
'DO SOMETHING ELSE
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