is this it?
Private Sub Test(ByRef myie As SHDocVw.InternetExplorer)
Set iedoc = myie.Document
Dim Fill As HTMLTableCell
QMSI = False
Call NextScreen(myie)
While myie.busy
DoEvents
Wend
' I tried to replace the above "While myie.busy - DoEvents - Wend" with While myie.busy Or myie.readystate <> 4: DoEvents: Wend this but no good
' I even tried put a Do While loop "Do - Set FillHistory = iedoc.getElementsByName("fill_seg") - While iedoc.getElementsByName("fill_seg") <> 0" but also no good
' the code break here (per debug.print) right before the Set statement.
'Do I need to delcare "FillHistory" As HtmlElementCollection and "lookqmis" as String or something else?
Set FillHistory = iedoc.getElementsByName("fill_seg")
' I place a debug.print for FillHistory here and nothing happen only a blank when the code break
For Each Fill In FillHistory(0)
lookqmis = Fill.innerText
If InStr(1, lookqmsi, "open") <> 0 Then
'my routine
QMSI = True
End If
Next
End Sub
Bookmarks