This will parse out the td tag after the tag containing U Case as it's textEDIT: Finished the exampleCode:Private Sub Command1_Click() Dim strURL As String Dim objHTML Dim intPos As Integer Dim strHTML As String strURL = "C:\Documents and Settings\Mark\Desktop\Confirm\Confirm.htm" Set objHTML = CreateObject("Microsoft.XMLHTTP") objHTML.open "GET", strURL, False objHTML.send strHTML = objHTML.responseText Set objHTML = Nothing 'Find the U Code text and remove everything before it intPos = InStr(strHTML, "U Code") strHTML = Mid(strHTML, intPos) 'Find the next td tag. This will hold the data you are after intPos = InStr(strHTML, "<td") strHTML = Mid(strHTML, intPos) 'Find the closing td tag and remove everything after it intPos = InStr(strHTML, "</td>") + 4 strHTML = Left(strHTML, intPos) 'strip off everything after the value intPos = InStr(strHTML, "</") - 1 strHTML = Left(strHTML, intPos) 'remove everything before your value intPos = InStrRev(strHTML, ">") + 1 strHTML = Mid(strHTML, intPos) 'this should be the value you are looking for Text1.Text = strHTML End Sub




Reply With Quote