Thread: Wait for FTP
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RANDY IN NC[_9_] RANDY IN NC[_9_] is offline
external usenet poster
 
Posts: 1
Default Wait for FTP


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...


--
RANDY IN NC
------------------------------------------------------------------------
RANDY IN NC's Profile: http://www.excelforum.com/member.php...o&userid=29778
View this thread: http://www.excelforum.com/showthread...hreadid=510702