Sam Cohen
asked on
Uploading Files on computer to FTP server-- simple error i think,please help
I have this code below on On_click button on form and i keep getting a User-defined type not define error:
Private Sub Command61_Click()
On Error GoTo ErrHandler
Dim objFTP As InetTransferLib.FTP
Const conTARGET = "ftp://myserver.com" '<------------------------
Set objFTP = New InetTransferLib.FTP
With objFTP
.FtpURL = conTARGET
.SourceFile = vbNullString '<------------------------
.DestinationFile = "/etc/""Me.Pic2""" '<------------------------
.AutoCreateRemoteDir = True
If Not .IsConnected Then .DialDefaultNumber
.ConnectToFTPHost "username", "password" '<------------------------
.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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Quick question , does this code transfer jpgs ? gifS?
It should transfer anything.
ASKER
i have access 2002
why cant i get that inetlib****
to add-in
I cant seem to get it in my refs
Any thoughts??
why cant i get that inetlib****
to add-in
I cant seem to get it in my refs
Any thoughts??
ASKER
I got it !!
But im get an error "access denied"
it gets as far as creating a folder on server
is something in the code set wrong\
----i have increase the points
But im get an error "access denied"
it gets as far as creating a folder on server
is something in the code set wrong\
----i have increase the points
ASKER