Failing loop

mardi 17 février 2015

Right, this has kind of got me baffled.



I run my code and it loops fine most of time, it can process upto a few thousand records then gets stuck here, no fail messages



cTime = Now() + TimeValue("00:00:5")

Do While ie.Busy = True Or ie.ReadyState <> 4 Or Now() > cTime

' MsgBox (Now() > cTime)

'MsgBox (IE.ReadyState)

'MsgBox (Iie.Busy)

'IE.Visible = True

DoEvents

Loop





Now if I remove the ' to show the message box`s,it shows



True

4

True



which normally results in it gets past, but odd time it just gets stuck there, but still displays True, 4 , True, but loops back in this



Any ideas?

Failing loop

0 commentaires:

Enregistrer un commentaire

Labels