Dear Alex
thanks for your help. I changed it into the following code to upload my
databse to the FTP at my ISP.
********** Code Start ****************
'This code was originally written by Dev Ashish
'It is not to be altered or distributed,
'except as part of an application.
'You are free to use it in any application,
'provided the copyright notice is left unchanged.
'
'Code Courtesy of
'Dev Ashish
'
Sub TestFTPUpload()
On Error GoTo ErrHandler
Dim objFTP As InetTransferLib.FTP
Const conTARGET = "ftp://ftp2.xxxxxx.es"
Set objFTP = New InetTransferLib.FTP
With objFTP
.FtpURL = conTARGET
.SourceFile = vbNullString
.DestinationFile = "ftp://ftp2.xxxxxxx.es/Data/"
.AutoCreateRemoteDir = True
If Not .IsConnected Then .DialDefaultNumber
.ConnectToFTPHost "dom-xxxxxxx-barna.com", "xxxlf2"
.UploadFileToFTPServer
End With
ExitHere:
On Error Resume Next
Set objFTP = Nothing
Call SysCmd(acSysCmdRemoveMeter)
Exit Sub
ErrHandler:
MsgBox Err.Number & vbCrLf & Err.Description, _
vbCritical + vbOKOnly, Err.Source
Resume ExitHere
End Sub
Now I have to more questions:
a) How does this module know which file I would like to transfer? (the file
to be transferred has the name "transferdb.mdb
b) how can I create the module?