help with Internet Data Transfer Library from the Access Web

K

Karen

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top