I get the error when running the code below, both from the IDE and from the compiled exe. Running using the IDE and putting a breakpoint and then stepping it works fine.
So what's it waiting for? I've put 1 second delays all over the place to see what is causing the error...but still get the error![]()
17/01/2006 01:14:45",35764,"Still executing last request","Dailytext_01 Function CheckIfFileExist
VB Code:
Public Function CheckIfFileExist(strRemoteFolder As String, strRemoteFile As String) As Boolean Dim var_data As Variant Dim str_data As String Dim i%, strFtpFiles() As String Dim blnExist As Boolean On Error GoTo ErrorLog Screen.MousePointer = vbHourglass With Inet1 .Execute , strRemoteFolder sngWait = SleepEx(1000, 1000) .Execute , "DIR" sngWait = SleepEx(1000, 1000) var_data = .GetChunk(9, icString) str_data = str_data & var_data sngWait = SleepEx(1000, 1000) str_data = Trim(str_data) If str_data <> "<!DOCTYPE" Then blnExist = True 'Exit For End If 'use the following line only if you have to close connection '''.Execute , "CLOSE" End With sngWait = SleepEx(1000, 1000) DeleteUrlCacheEntry (Inet1.url & strRemoteFolder & "/" & strRemoteFile) sngWait = SleepEx(1000, 1000) CheckIfFileExist = blnExist Screen.MousePointer = vbDefault Exit Function
Any ideas...this is driving me mad!!![]()




Reply With Quote