RT

解决方案 »

  1.   

    部件Microsoft Internet Transfer Controls6.0楼主需要学会问问题的技巧,你的另外张帖问得是莫名奇妙
      

  2.   

    http://www.21code.com/codebase/?pos=down&id=2095
      

  3.   

    是不是
    Inet1.OpenURL "http://sc-down.downloadsky.com/down/absolute_483.zip", 0然后呢?
      

  4.   

    引用Microsoft Internet Transfer Controls6.0
    '下载函数
    Public Sub DownLoadFile(SourceFile As String, DestFile As String)
    On Error GoTo LocalError
        Inet1.Execute "GET " & SourceFile & " " & DestFile
        Do While Inet1.StillExecuting = True
            DoEvents
        Loop
        If LoggingState = True Then
            Print #1, Now & "  Response on download: " & Inet1.ResponseInfo
        End If
        
        Exit Sub
    LocalError:
        If Err.Number <> 0 Then
            Err.Raise Err.Number, Err.Source, Err.Description
        End If
    End Sub'连接函数
    Public Sub Connect(Optional ByVal FtpUrl As String, Optional ByVal Username As String, Optional ByVal PassWord As String)
    On Error Resume Next
         Inet1.Cancel
        
    On Error GoTo LocalError
            
        
        Inet1.AccessType = icUseDefault
        Inet1.URL = FtpUrl
        Inet1.Username = Username
        Inet1.PassWord = PassWord
        Inet1.RequestTimeout = 40
        
        Inet1.Execute , "DIR"
        Do While Inet1.StillExecuting
             DoEvents
        Loop   
        Exit Sub
    LocalError:
        Inet1.Cancel
        If Err.Number <> 0 Then
            Err.Raise Err.Number, Err.Source, Err.Description
        End If
    End Sub