如何在有大量记录的webtable中查找指定的值
iStart = 1
iEnd = ...WebTable().RowCount
Do While iStart < iEnd
iMiddle = (iStart + iEnd) \ 2
value = WebTable.GetCellData(1, iMiddle)
iCompare = StrComp(value, strFind)
If iCompare = 0 then
'Exact match has been found
Msgbox "Value found at - " & iMiddle
Exit Do
ElseIf iCompare = 1 then
'Value is greater than strFind
iEnd = iMiddle - 1
Else
' Value is less than strFind
iStart = iMiddle + 1
End If
Loop