Hi Terry
Use it like this way:
Function UploadFile(ByVal HostName As String, _
ByVal UserName As String, _
ByVal Password As String, _
ByVal LocalFileName As String, _
ByVal RemoteFileName As String) As Boolean
UserName = "terry" 'ex
Password = "123" 'ex
LocalFileName = drvDrive.Drive + "\chat.txt"
RemoteFileName = "httpdocs/chat.txt"
HostName = "ftp.terryoleary.com"
Dim FTP As Inet
Set FTP = New Inet
With FTP
.Protocol = icFTP
.RemoteHost = HostName
.UserName = UserName
.Password = Password
.Execute .URL, "Put " + LocalFileName + " " + RemoteFileName
Do While .StillExecuting
DoEvents
Loop
UploadFile = (.ResponseCode = 0)
End With
Set FTP = Nothing
End Function
For more information click here
Regards
DoctorMahdi
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).