Dim ftp1 As New FtpClient ftp1.Host="196.128.143.28" 'ftp1.Host = "123.125.114.144" If Network.Ping(ftp1.Host) Then ftp1.Account = "foxuser" ftp1.Password = "138238110" ftp1.TimeOut = 2 If ftp1.Connect = False Then msgbox("无法连接") End If Else msgbox("无法ping通") End If