PDA

View Full Version : Running FTP commands from Excel Macro



nagarajulu.a
09-03-2007, 11:10 PM
I have a VBA Excel macro written which has to create a CSV file from the given sheet and FTP the genrated CSV file to the remote server..

The sample code that iam using for FTP is:

open SBYADB2307
FTPCOMP
Lincoln1
ascii
cd /
cd /db26000/nbstpv8/transfer
send C:\Nagaraj@rushmore\dfltcompopt.csv
bye
exit

This commands are stored in text file and iam using "ftp -s:textfilename" option to run this FTP commands within Excel macro.

The problem for me is, the same commands executed manually will deliver the CSV file to the remote server. But when it runs through the Macro, it doesn't.

Please help me.

CCkfm2000
09-04-2007, 12:49 AM
this is out of my depth but check this link

http://www.bygsoftware.com/Excel/VBA/ftp.htm

nagarajulu.a
09-04-2007, 03:09 AM
Thanks... The link you gave is helpful..