Public Function FTPFileTransafer(ByVal Host As String, _

Public Function FTPFileTransafer(ByVal Host As String, _
                                  ByVal User As String, _
                                  ByVal Password As String, _
                                  ByVal Serverfilepath As String, _
                                  ByVal LocalFilePath As String) As Boolean

On Error GoTo FTPError

        Dim intFTPConnect As Integer
        Dim intFTPPutFile As Integer

        FTPFileTransafer = False

        Dim objftp As FTP2.clsFTP
        Set objftp = New FTP2.clsFTP
        objftp.Host = Host
        objftp.User = User
        objftp.Password = Password

        intFTPConnect = objftp.Connect(objftp.Host, objftp.User, objftp.Password)


        Call objftp.PutFile(LocalFilePath, Serverfilepath, ftAscii) ' ftBinary
        'Call objftp.GetFile(  LocalFilePath, Serverfilepath, 1)

        objftp.Disconnect
        Set objftp = Nothing
        FTPFileTransafer = True
        Exit Function

FTPError:

       MsgBox Err.Description
        objftp.Disconnect
        Set objftp = Nothing
        FTPFileTransafer = False
        Exit Function
End Function
Re: Error while FTP a file using VB 6.0 ( Error while call Putfile) 80 80

What error is being reported?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.