I've downloaded the Internet Data Transfer Library from The Access Web
but I need some help getting it to work.
I've imported the class modules and the modMain from the
InetTransferlib.mda file that I unzipped. I then wrote in the code as
shown on The Access Web to to the FTP Upload.
Sub FTPUpload()
On Error GoTo ErrHandler
Dim objFTP As InetTransferLib.FTP
Const conTarget = "ftp://{server}" 'i have the real server name here
Set objFTP = New InetTransferLib.FTP
With objFTP
.FtpURL = conTarget
.SourceFile = vbNullString
.DestinationFile = "/pages/common/pdf/certificates/*.*"
.AutoCreateRemoteDir = True
.ConnectToFTPHost "XXXXXXX", "********" ' i have the real username
and password in here
.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
When I click on the button I created (it's code is the call to the
FTPUpload) I get an error:
"User-defined Type not defined" and the following is highlighted in
grey...
objFTP As InetTransferLib.FTP
and when I click the OK button this is highlighted in yellow...
Sub FTPUpload()
Where have I gone wrong?
Thanks for all of your help.
Karen
I've posted this twice with no reply, so this time I thought I'd keep
it short and sweet. I simply don't know how to go about using the file
that I've downloaded. I need someone to give me better instructions
than The Access Web's "To use this functionality in Microsoft 2000 or
higher, please import all the classes from the addin (which does not
have the tables required for a typical Access addin) in your own Access
project. To use the classes, just refer to them withthe
'InetTranserLib.' prefix (eg: Dim objHTTP As HTTP)".