Wait for FTP

R

RANDY IN NC

I have a VBA that is saving a file to an FTP file... It will work some
of the time... I appears to work if I manually save a File to the FTP
site first... then run the macro...

After the save the macro closes the file.. It has been suggested that
possibly it is not giving the Ftp site time to check the user name and
password before going on... is there a way to check this and slow it
down so that it would not have this problem...

Code is below

Dim sStr As String
'sStr = "ftp://"ftp address and sign on/"
sStr = sStr & _
ActiveWorkbook.Worksheets(1) _
..Range("a2").Text
sStr = sStr & "_"
sStr = sStr & Format(Now, "mm-dd-yy_hh-mm")
sStr = sStr & ".csv"
ActiveWorkbook.SaveAs _
Filename:=sStr, FileFormat:=xlCSV
ActiveWorkbook.Close
ActiveWorkbook.Close
Application.DisplayAlerts = True
Application.ScreenUpdating = True


It stops at save as when it stops...

Thank you for any help I can get...
 

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