can anyone help me with this coding? i'm trying to get Loop to check if the browser is still busy and if its been busy for
more than 3 secs to stop

VB Code:
  1. Dim gStart As Long
  2. gStart = Timer
  3.  
  4.   Do
  5.   DoEvents
  6.   Loop Until If Not WebBrowser1.Busy = True Then
  7.   End If
  8.   ElseIf InStr(1, WebBrowser1.LocationURL, "user?/nemx") <> 0 And Timer - gStart > 3 And
  9.   Not WebBrowser1.Busy = False Then
  10.   WebBrowser1.Stop
  11.   End If