Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem setting up Inet Control 1

Status
Not open for further replies.

RikHess

MIS
Jul 25, 2002
69
US
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


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
 
Thanks! I also found that leaving off the site name on the execute was needed as well.

Code:
   objFTP.Execute strSite, "CD data/" '--bad
but
   objFTP.Execute , "CD data/"  '--works!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top