I am just getting started with the Internet Transfer Control and I am having trouble getting it set up right.
Below is a segment of my code that shows how I am trying to use the control, but at the indicated instruction the system returns an error "35754: Unable to connect to remote host".
Does anyone have an idea how to get this to work?
Thanks in advance,
Rik
Below is a segment of my code that shows how I am trying to use the control, but at the indicated instruction the system returns an error "35754: Unable to connect to remote host".
Does anyone have an idea how to get this to work?
Thanks in advance,
Rik
Code:
Private objFTP
Private Sub cmdPutFile_Click()
Dim strSite As String
Dim strFile As String
strSite = "ftp://ftp-[URL unfurl="true"]www.earthlink.net/~<myname>/"[/URL]
strFile = "C:\test.txt"
objFTP.UserName = "<loginname>"
objFTP.Password = "<loginpwd>"
objFTP.Protocol = icFTP
objFTP.URL = strSite
'>>>> error occurs when next statement is run
objFTP.Execute strSite, "CD data/"
objFTP.Execute strSite, "Put " & strFile & " " & strFile
Exit Sub
End Sub
Private Sub Form_Load()
' Set a reference to the internet transfer control.
Set objFTP = Me!axFTP.Object
End Sub