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