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








    ftp.terryoleary.com"

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














    For more information click here

    Regards

    DoctorMahdi

Post a reply

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

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

Contribute

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.

“C++: an octopus made by nailing extra legs onto a dog.” - Steve Taylor