Function GetTableValue(ByVal sTable As String, ByVal iRow As Integer, ByVal iCol As Integer)
Dim iLoop As Integer
Dim iPtr As Integer
Dim iRowLeft As Integer
Dim iRowRight As Integer
Dim sRow As String
Dim sCell As String
iPtr = 1
For iLoop = 1 To iRow
iPtr = InStr(iPtr, sTable, "<tr", CompareMethod.Text)
iPtr = iPtr + 3
Next
iRowLeft = iPtr - 3
iRowRight = GetDirect(iRowLeft, sTable, "</tr>", False)
sRow = Mid(sTable, iRowLeft, iRowRight - iRowLeft + 5 - 1)
iPtr = 1
For iLoop = 1 To iCol
iPtr = InStr(iPtr, sRow, "<td", CompareMethod.Text)
iPtr = iPtr + 3
Next
iRowLeft = iPtr - 3
iRowRight = GetDirect(iRowLeft, sRow, "</td>", False)
sCell = Mid(sRow, iRowLeft, iRowRight - iRowLeft + 5)
iRowLeft = InStr(1, sCell, ">", CompareMethod.Text)
iRowRight = InStr(iRowLeft, sCell, "</td>", CompareMethod.Text)
sCell = Trim(Mid(sCell, iRowLeft + 1, iRowRight - iRowLeft - 1))
GetTableValue = sCell
End Function