Re: Upload excel spreadsheet by ftp

  • 14 years ago

    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 = "


    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
    UploadFile = (.ResponseCode = 0)
    End With
    Set FTP = Nothing
    End Function

    For more information click here



Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Anyone who considers arithmetic methods of producing random digits is, of course, in a state of sin.” - John von Neumann