I am trying to make prob vb6 wait for the creation of a PDF file. Right now I'm pausing in 3 seconds:
startTime = Time endTime = TimeValue(startTime) + TimeValue(TimeSerial(0,0,3)) While endTime > Time Wend If FSO.FileExists(sPdfFileName) Then OkCreatedPDF = True Else OkCreatedPDF = False End If
but several times creating a PDF takes more than 3 seconds. Therefore, I would like to wait until the file is created, but with a timeout (says 10 seconds). I prefer not to extend the wait time, as this will be done a thousand times.
source share