Por que estas usando un control de terceros...?
________________________________ > From: [EMAIL PROTECTED] > To: [email protected] > Subject: [vbusers] Subir y Bajar ARchivos > Date: Fri, 29 Dec 2006 09:14:02 -0300 > > Hay que usar el ocx MabryFTP (que adjunto al mensaje para que no renieguen) > Este es un extracto de como se usa para subirlo: > (Donde Ftp es el nombre del control pegado en el formulario.) > Private Function Subir_a_FTP() > On Error GoTo handler > Dim cUbicacion As String > Dim cUsuario As String > Dim cPassword As String > Dim cCarpeta As String > cUbicacion = Trim$(g_globales.GetConfig("INET_URL")) > cUsuario = Trim$(g_globales.GetConfig("INET_USER")) > cPassword = Trim$(g_globales.GetConfig("INET_PASS")) > cCarpeta = Trim$(g_globales.GetConfig("INET_CARPETA")) > Ftp.DebugMode = 1 > Ftp.Blocking = True > Ftp.Host = cUbicacion > Ftp.LogonName = cUsuario > Ftp.LogonPassword = cPassword > Ftp.TimeOut="200" > Ftp.Connect > If Not oArchivoExp.ValidarErrorFTP(Ftp.LastError) Then > Ftp.SrcFilename = Ruta + Nombre > Ftp.DstFilename = cCarpeta + Nombre > Ftp.PutFile > If oArchivoExp.ValidarErrorFTP(Ftp.LastError) Then > MsgBox "Error XX" > End If > Else > msgbox "Error XX" > End If > Ftp.Disconnect > Exit Sub > handler: > If Ftp.LastError <> 20602 Then > If oArchivoExp.ValidarErrorFTP(Ftp.LastError) Then > MsgBox "Error XX" > End If > Else > Resume Next > End If > Este es un extracto de como se usa para bajarlo: > Private Sub Bajar_de_FTP(ByVal Ruta As String, ByVal Nombre As String) > On Error GoTo HANDLER > Dim cUbicacion As String > Dim cUsuario As String > Dim cPassword As String > Dim cCarpeta As String > cUbicacion = oArchivoImp.URL > cUsuario = oArchivoImp.Usuario > cPassword = oArchivoImp.Password > cCarpeta = oArchivoImp.Ubicación > FTP.DebugMode<ftp://ftp.debugmode/> = 1 > FTP.Blocking<ftp://ftp.blocking/> = True > FTP.Host<ftp://ftp.host/> = cUbicacion > FTP.LogonName<ftp://ftp.logonname/> = cUsuario > FTP.LogonPassword<ftp://ftp.logonpassword/> = cPassword > FTP.Connect<ftp://ftp.connect/> > If Not oArchivoImp.ValidarErrorFTP(FTP.LastError<ftp://ftp.lasterror/>) > Then > FTP.SrcFilename<ftp://ftp.srcfilename/> = cCarpeta + Nombre > FTP.DstFilename<ftp://ftp.dstfilename/> = Ruta + Nombre > FTP.GetFile<ftp://ftp.getfile/> > If oArchivoImp.ValidarErrorFTP(FTP.LastError<ftp://ftp.lasterror/>) > Then > MsgBox "Error XX" > End If > Else > MsgBox "Error XX" > End If > If FTP.State<ftp://ftp.state/> = 1 Then > FTP.Disconnect<ftp://ftp.disconnect/> > Exit Sub > HANDLER: > If FTP.LastError<ftp://ftp.lasterror/> <> 20602 Then 'Ocurre cuando se > esta conectado al sitio FTP y se intenta conectar de nuevo > If oArchivoImp.ValidarErrorFTP(FTP.LastError<ftp://ftp.lasterror/>) > Then > MsgBox "Error XX" > End If > Else > Resume Next > End If > End Sub > Saludos > Ariel J. Bidini _________________________________________________________________ Descubre Live.com - tu propia página de inicio, personalizada para ver rápidamente todo lo que te interesa en un mismo sitio. http://www.live.com/getstarted
