Dale Kalsow
dkalsow at yahoo.com
Mon Nov 4 10:11:47 CST 2013
Set objCollection = IE.document.getElementsByTagName("input")
i = 0
While i < objCollection.Length
If objCollection(i).Name = "ctl00$ctl00$MainContent$uxSearchWideControl$txtFirstName" Then
'objCollection(i).Value = ActiveSheet.Range("A1, A5").Value
objCollection(i).Value = strValue
ElseIf objCollection(i).Name = "ctl00$ctl00$MainContent$uxSearchWideControl$txtLastName" Then
objCollection(i).Value = ActiveCell.Offset(0, 1).Value
Set objCollection = IE.document.getElementsByTagName("a")
'If objCollection(i).href = "#" Then
'Set objElement = objCollection(i)
'End If
Else
If objCollection(i).ID = "lnkSearch" And _
objCollection(i).Title = "Search" Then
Set objElement = objCollection(i)
End If
End If
i = i + 1
Wend
objElement.Click
Do While IE.Busy
Application.Wait DateAdd("s", 1, Now)
Loop
Application.Wait DateAdd("s", 3, Now)
Set objCollection = IE.document.getElementsByTagName("p")
i = 0: blnLoop = True: intI = objCollection.Length
While blnLoop
If objCollection(i).classname = "NoResultsSummaryText" Then
IE.Quit
blnLoop = False
End If
i = i + 1
If i >= intI Then blnLoop = False
Wend