Hi, hope someone can help

I have the following working function to retrieve the Dell "Ship Date" from the dell Website, which can be found here

This works fine when the Warranty info is formatted with one line stating
"Next Business Day"

however returns a null when the Warranty info has more than one line, for example

"Next Business Day"
"Dell Business Support / ProSupport"

Two example links

One Line

Two Lines

[/URL]
VB Code:
  1. Function GetWarranty(ByVal strCurrentTag)
  2.         Dim objHTTP, strPageText, strURL, strHeading
  3.         Dim intSummaryPos, intSummaryTableStart, intSummaryTableEnd, strInfoTable, arrCells, intCell, intOpenTag, intClosetag
  4.         'Dim strNewCell, strCurrentTag, i, intField
  5.         Dim strNewCell, i, intField, strShipDate
  6.         Dim arrHeadings() = {"Service Tag:", "Days Left"}
  7.  
  8.         objHTTP = CreateObject("Msxml2.XMLHTTP")
  9.         Dim strField(400)
  10.         strField(0) = Now
  11.         strPageText = ""
  12.         strURL = "http://supportapj.dell.com/support/topics/topic.aspx/ap/shared/support/my_systems_info/en/details?c=in&cs=inbsd1&l=en&s=bsd&ServiceTag=" & strCurrentTag & "&~tab=1"
  13.         'strURL = "http://support.dell.com/support/topics/global.aspx/support/my_systems_info/details?c=us&l=en&s=k12&servicetag=" & strCurrentTag
  14.         objHTTP.open("GET", strURL, False)
  15.         objHTTP.send()
  16.         strPageText = objHTTP.responseText
  17.         'MsgBox(arrHeadings.Length)
  18.  
  19.         For Each strHeading In arrHeadings
  20.             intSummaryPos = InStr(LCase(strPageText), LCase(strHeading))
  21.             If intSummaryPos > 0 Then
  22.                 intSummaryTableStart = InStrRev(LCase(strPageText), "<table", intSummaryPos)
  23.                 intSummaryTableEnd = InStr(intSummaryPos, LCase(strPageText), "</table>") + 8
  24.                 strInfoTable = Mid(strPageText, intSummaryTableStart, intSummaryTableEnd - intSummaryTableStart)
  25.                 strInfoTable = Replace(Replace(Replace(strInfoTable, vbCrLf, ""), vbCr, ""), vbLf, "")
  26.                 arrCells = Split(LCase(strInfoTable), "</td>")
  27.  
  28.                 For intCell = LBound(arrCells) To UBound(arrCells)
  29.                     arrCells(intCell) = Trim(arrCells(intCell))
  30.                     intOpenTag = InStr(arrCells(intCell), "<")
  31.  
  32.                     While intOpenTag > 0
  33.                         intClosetag = InStr(intOpenTag, arrCells(intCell), ">") + 1
  34.                         strNewCell = ""
  35.                         'If intOpenTag > 1 Then strNewCell = strNewCell & Trim(Left(arrCells(intCell), intOpenTag - 1))
  36.                         If intClosetag < Len(arrCells(intCell)) Then strNewCell = strNewCell & Trim(Mid(arrCells(intCell), intClosetag))
  37.  
  38.                         arrCells(intCell) = Replace(Trim(strNewCell), " &nbsp;&nbsp;&nbsp;&nbsp;change service tag", "")
  39.                         intOpenTag = InStr(arrCells(intCell), "<")
  40.  
  41.                     End While
  42.                 Next
  43.  
  44.                 If LCase(arrCells(0)) = LCase("Service Tag:") Then
  45.                     strCurrentTag = ""
  46.  
  47.                     i = 0
  48.  
  49.                     For intField = 1 To UBound(arrCells) Step 2
  50.                         i = i + 1
  51.                         strField(i) = arrCells(intField)
  52.                     Next
  53.  
  54.                 ElseIf LCase(arrCells(0)) = LCase("Description") Then
  55.                     i = 0
  56.  
  57.                     For intField = 5 To UBound(arrCells)
  58.                         strCurrentTag = strCurrentTag & ",""" & arrCells(intField) & """"
  59.                         i = i + 1
  60.                         strField(i) = arrCells(intField)
  61.                     Next
  62.                 End If
  63.  
  64.             Else
  65.  
  66.                 strShipDate = "No Info"
  67.                 Return strShipDate
  68.  
  69.                 End
  70.  
  71.             End If
  72.         Next
  73.  
  74.         strShipDate = strField(8)
  75.  
  76.         Return (strShipDate)
  77.  
  78.     End Function