Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ftp from Access 1

Status
Not open for further replies.

halfbarrel

Programmer
Jun 12, 2002
44
US
Hello,
I found the below code in thread Thread181-83297, but do not know which library to reference in my vba code. Can someone help?
Thanks,

Set FTPconn = New Inet
'Set Properties
FTPconn.Protocol = icFTP
FTPconn.RequestTimeout = 600
FTPconn.URL = "ftp://ftp.address"
'Connect
FTPconn.OpenURL
Do While FTPconn.StillExecuting = True
DoEvents
Loop
'Navigate To Directory
FTPconn.Execute , "cd ."
Do While FTPconn.StillExecuting = True
DoEvents
Loop
'Get File
updateToLocation = CurrentProject.path & "\" & fileToUpdate
executeCmd = "get " & fileToUpdate & " " & updateToLocation
FTPconn.Execute , executeCmd
Do While FTPconn.StillExecuting = True
DoEvents
Loop
'Kill Connection
FTPconn.Cancel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top