请各位大侠看看如下代码,怎么都是发送指令无效,错在那里?Private Sub Command2_Click()username = username.Text
password = password.Text
hosthome = hosthome.Text
port = port.Text
filename = filename.Text
With Inet1
.URL = "ftp://" & hosthome & ":" & port & "/" & filename
.Protocol = icFTP
.username = username
.password = password
.RequestTimeout = 120
End With
Call Inet1.Execute(, "put", "c:\vb\abc.xls", "abc.xls")End Sub
password = password.Text
hosthome = hosthome.Text
port = port.Text
filename = filename.Text
With Inet1
.URL = "ftp://" & hosthome & ":" & port & "/" & filename
.Protocol = icFTP
.username = username
.password = password
.RequestTimeout = 120
End With
Call Inet1.Execute(, "put", "c:\vb\abc.xls", "abc.xls")End Sub
执行dir命令Private Sub Command1_Click()
Dim StrMsg As String
Dim isbusy As Boolean
Inet1.URL = "ftp://www.ourfly.com/"
Inet1.Protocol = icFTP
Inet1.UserName = "ouly"
Inet1.Password = "ou950868"
StrMsg = "Dir"
Inet1.Execute , StrMsg
End SubPrivate Sub Command2_Click()
On Error GoTo errhandle:
Dim s1 As String
Inet1.Execute , "Get 2.zip C:\234.zip"
Do While isbusy
isbusy = Inet1.StillExecuting
DoEvents
Loop
errhandle:
MsgBox Err.Description
End SubPrivate Sub Inet1_StateChanged(ByVal State As Integer)
Select Case State
Case 1
Text1.Text = "is looking"
Case 2
Text1.Text = "success finding "
Case 3
Text1.Text = "is connecting"
Case 4
Text1.Text = "success connected"
Case 5
Text1.Text = "is sending request"
Case 6
Text1.Text = "sucess sending"
Case 7
Text1.Text = "is receiving"
Case 8
Text1.Text = "success receive"
Case 9
Text1.Text = "is disconnecting"
Case 10
Text1.Text = "success disconnect"
Case 11
Text1.Text = "is error"
Case 12 'icResponseCompleted
Text1.Text = "success receive data"
bDowning = False
End Select
End Sub