ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Accessing FTP through VBA Macro (https://www.excelbanter.com/excel-programming/330954-accessing-ftp-through-vba-macro.html)

robsix6

Accessing FTP through VBA Macro
 

Question:

Is it possible to program a macro to 1) go to a ftp site 2) download a
file 3) unzip that file?

This sounds possible, but I'm going nuts but I don't know how to
begin.

I know that in excel you can go to Data|Import|New Web Query and find
the file...
however I don't know how to go outside of Excel and unzip the file.

Has anyone seen anything like this before?

Rob


--
robsix6
------------------------------------------------------------------------
robsix6's Profile: http://www.excelforum.com/member.php...o&userid=24045
View this thread: http://www.excelforum.com/showthread...hreadid=376564


Gary's Student

Accessing FTP through VBA Macro
 
The simplest way is to use an external script to access the FTP and then run
the script through the SHELL function.

See:
http://support.microsoft.com/default.aspx?kbid=96269
--
Gary's Student


"robsix6" wrote:


Question:

Is it possible to program a macro to 1) go to a ftp site 2) download a
file 3) unzip that file?

This sounds possible, but I'm going nuts but I don't know how to
begin.

I know that in excel you can go to Data|Import|New Web Query and find
the file...
however I don't know how to go outside of Excel and unzip the file.

Has anyone seen anything like this before?

Rob


--
robsix6
------------------------------------------------------------------------
robsix6's Profile: http://www.excelforum.com/member.php...o&userid=24045
View this thread: http://www.excelforum.com/showthread...hreadid=376564



KL

Accessing FTP through VBA Macro
 
Hi robsix6,

You may want to have a look at this:
http://www.bygsoftware.com/Excel/VBA/ftp.htm

Regards,
KL


"robsix6" wrote in
message ...

Question:

Is it possible to program a macro to 1) go to a ftp site 2) download a
file 3) unzip that file?

This sounds possible, but I'm going nuts but I don't know how to
begin.

I know that in excel you can go to Data|Import|New Web Query and find
the file...
however I don't know how to go outside of Excel and unzip the file.

Has anyone seen anything like this before?

Rob


--
robsix6
------------------------------------------------------------------------
robsix6's Profile:
http://www.excelforum.com/member.php...o&userid=24045
View this thread: http://www.excelforum.com/showthread...hreadid=376564




KL

Accessing FTP through VBA Macro
 
Hi again,

I also did something like this some time ago:

1) Create a *.txt file, say c:\Batch.txt
2) In the Batch.txt write the following script (change "ftp.server.com" the
real FTP server, "UserName" to the real FTP server username, "Password" the
real FTP acces password, "C:\MyFile.xls" to the name and directory of the
file to be copied. Don't use quotation marks) :

open ftp.server.com
UserName
Password
send C:\MyFile.xls
bye

More info about switches he
http://www.computerhope.com/software/ftp.htm#04

3) Run a code like this:

Shell ("ftp -s:c:\Batch.txt")

Reagrds,
KL


"KL" wrote in message
...
Hi robsix6,

You may want to have a look at this:
http://www.bygsoftware.com/Excel/VBA/ftp.htm

Regards,
KL


"robsix6" wrote in
message ...

Question:

Is it possible to program a macro to 1) go to a ftp site 2) download a
file 3) unzip that file?

This sounds possible, but I'm going nuts but I don't know how to
begin.

I know that in excel you can go to Data|Import|New Web Query and find
the file...
however I don't know how to go outside of Excel and unzip the file.

Has anyone seen anything like this before?

Rob


--
robsix6
------------------------------------------------------------------------
robsix6's Profile:
http://www.excelforum.com/member.php...o&userid=24045
View this thread:
http://www.excelforum.com/showthread...hreadid=376564






Nigel

Accessing FTP through VBA Macro
 
Others appear to provide a solution for the ftp question.
In terms of unzippng the file have a look at RondeBruin site

http://www.rondebruin.nl/unzip.htm


--
Cheers
Nigel



"robsix6" wrote in
message ...

Question:

Is it possible to program a macro to 1) go to a ftp site 2) download a
file 3) unzip that file?

This sounds possible, but I'm going nuts but I don't know how to
begin.

I know that in excel you can go to Data|Import|New Web Query and find
the file...
however I don't know how to go outside of Excel and unzip the file.

Has anyone seen anything like this before?

Rob


--
robsix6
------------------------------------------------------------------------
robsix6's Profile:

http://www.excelforum.com/member.php...o&userid=24045
View this thread: http://www.excelforum.com/showthread...hreadid=376564




robsix6[_2_]

Accessing FTP through VBA Macro
 

I have checked these sites out and famililarized myself with Batch file
and the shell code, yet don't know how to finalize and execute the batc
file from within the VBA... Is that self explanatory?


Thanks for the hel

--
robsix
-----------------------------------------------------------------------
robsix6's Profile: http://www.excelforum.com/member.php...fo&userid=2404
View this thread: http://www.excelforum.com/showthread.php?threadid=37656



All times are GMT +1. The time now is 08:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com