Re: VBscript for FTP upload

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



It seems that Excel needs to "know" that you are currently in/able to make
an FTP session. As such you can fake a download, just to bring up the login
dialog.
After that, the .SaveAs will work.
I could not get a direct .SaveAs to execute with the initial login step as
suggested by:
http://www.mrexcel.com/archive2/53600/62315.htm
Maybe related to recent IE updates about setting a username/pw in the URL,
but I thought related to HTTP rather FTP, but may be both:

On Error Resume Next
'Not existent file, just to bring up the FTP login dialog
Workbooks.Open Filename:="ftp://ftp.YOURSITE.com/NotThere.csv";
On Error GoTo 0

'Once you're logged into the FTP site, it has no problem saving the file.
Active***.SaveAs "ftp://ftp.YOURSITE.com/SomeFile.csv";, xlCSV

NickHK

"7857Acimovic" <7857Acimovic@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:287B888E-3980-42D2-B522-EEFF1CBA369D@xxxxxxxxxxxxxxxx
I am a VB beginner and I don't know how to export a CVS file to a FTP
server.
Right now I have excel work*** that is converted into a CVS file and
placed in the parent folder. What I don't know how to write is the VB
code
for uploading the CVS file to a ftp server. Anyone out there got ideas?



Thanks in advance,

Srdjan



.


Quantcast