hola juan
este es un código que uso yo.
Primero declaro las funciones de la API que necesito
y después hay una función a la que le pasa el archivo de origen y destino (ruta completa), la direccion IP, el login y password y un flag por si quieres colgar o descargar el archivo, y devuelve true o false si ha sido correcto
Espero que te valga. un saludo, Adolfo
'Funciones de FTP
Private Const INTERNET_OPEN_TYPE_PRECONFIG = 0 ' use registry configuration
Private Const INTERNET_DEFAULT_FTP_PORT = 21 ' default for FTP servers
Private Const INTERNET_SERVICE_FTP = 1
Private Const PassiveConnection As Boolean = True
Private Const INTERNET_FLAG_PASSIVE = &H8000000 ' used for FTP connections
Private Const FTP_TRANSFER_TYPE_UNKNOWN = &H0
Private Declare Function FtpGetFile Lib "wininet.dll" Alias "FtpGetFileA" (ByVal hConnect As Long, ByVal lpszRemoteFile As String, ByVal lpszNewFile As String, ByVal fFailIfExists As Long, ByVal dwFlagsAndAttributes As Long, ByVal dwFlags As Long, ByRef dwContext As Long) As Boolean
Private Declare Function FtpPutFile Lib "wininet.dll" Alias "FtpPutFileA" (ByVal hConnect As Long, ByVal lpszLocalFile As String, ByVal lpszNewRemoteFile As String, ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean
Private Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" (ByVal hInternetSession As Long, ByVal sServerName As String, ByVal nServerPort As Integer, ByVal sUserName As String, ByVal sPassword As String, ByVal lService As Long, ByVal lFlags As Long, ByVal lContext As Long) As Long
Private Declare Function InternetOpen Lib "winin