preludeofme
New Member
- Joined
- Dec 4, 2008
- Messages
- 34
I'm working on some code that i found from:http://www.excelhero.com/blog/2010/05/multi-threaded-vba.html
(which for those that haven't read the article, it is pretty cool stuff)
but what i'm trying to do is get the vbscript "bees" to read the sourcecode for the website i'm pulling from by using the MSHTML objects. below is what i've got so far, but it keeps erroring out at the "HTMLBody.innerHTML = oXML.responseText".
i was trying to avoid having to parse out the sourcecode line by line
and just use the html objects but i'm guessing vbscript doesn't have
that functionality... any ideas?
(which for those that haven't read the article, it is pretty cool stuff)
but what i'm trying to do is get the vbscript "bees" to read the sourcecode for the website i'm pulling from by using the MSHTML objects. below is what i've got so far, but it keeps erroring out at the "HTMLBody.innerHTML = oXML.responseText".
i was trying to avoid having to parse out the sourcecode line by line
and just use the html objects but i'm guessing vbscript doesn't have
that functionality... any ideas?
Code:
Set oXL = GetObject(, "Excel.Application")
Set oXML = Wscript.CreateObject("MSXML2.<WBR>XMLHTTP")
Set HtmlDoc = Wscript.CreateObject("<WBR>htmlfile")
Set HTMLBody = HtmlDoc.body
' Navigate to property page
oXML.Open "GET", URL,False
Wscript.Sleep 50
oXML.send
Wscript.Sleep 50
' Get html ////ERROR HAPPENS HERE////
HTMLBody.innerHTML = oXML.responseText
Set Ach = HTMLBody.document.<WBR>getElementById("<WBR>InformationGrid2")
If Ach Is Nothing Then
Else
For Each Row In Ach.Rows
If
Ach.Rows(Row.RowIndex).Cells(<WBR>0).innerText <> "Type" Then
If
Ach.Rows(Row.RowIndex).Cells(<WBR>0).innerText <> "No Requests found for
this Account " Then
Debug.Print
Ach.Rows(Row.RowIndex).Cells(<WBR>9).innerText
If
Ach.Rows(Row.RowIndex).Cells(<WBR>9).innerText = "Edit " Then
vResults(0) = Acct
vResults(1) =
Ach.Rows(Row.RowIndex).Cells(<WBR>0).innerText
vResults(2) =
Ach.Rows(Row.RowIndex).Cells(<WBR>1).innerText
vResults(3) =
Ach.Rows(Row.RowIndex).Cells(<WBR>2).innerText
vResults(4) =
Ach.Rows(Row.RowIndex).Cells(<WBR>3).innerText
vResults(5) =
Ach.Rows(Row.RowIndex).Cells(<WBR>4).innerText
vResults(6) =
Ach.Rows(Row.RowIndex).Cells(<WBR>5).innerText
vResults(7) =
Ach.Rows(Row.RowIndex).Cells(<WBR>6).innerText
vResults(8) =
Ach.Rows(Row.RowIndex).Cells(<WBR>7).innerText
vResults(9) =
Ach.Rows(Row.RowIndex).Cells(<WBR>8).innerText
vResults(10) =
Ach.Rows(Row.RowIndex).Cells(<WBR>9).innerText