Excel VbA FTP Transfers

E

E.Anderegg

Hello,
I need for a small project to retrieve a file via ftp from the internet,
process it with Excel an save it back to the FTP site. How can I do that
with vba??
I tried to create a link in Explorer to that ftp site, but this does not
work, so I'm looking for a more programmatic solution.
Any help is much appreciated!!

Ernst
 
R

Robin Hammond

For the download side, have a look at this very simple API call:

Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
"URLDownloadToFileA" (ByVal pCaller As Long, ByVal strURL As String, _
ByVal strFileName As String, ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long

Usage:

if URLDownloadToFile(0, strFullURL, strLocation, 0, 0) = Then 'successful
download took place

Robin Hammond
www.enhanceddatasystems.com
Check out our XspandXL add-in
 

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