Using the method below, ie brings all myLink into my excel cells the way it is in the web page -
result = ie.document.body.innerHTML
Set html = CreateObject("htmlfile")
html.body.innerHTML = result
Set myLinks = html.getElementsByTagName("A")
For Each myLink In myLinks
Sheet1.Cells(i, "A").Value = myLink
Therefore I have to write a few conditional Replace statements to replace some left characters in some myLink with http://www.
But when I use the method below, ie brings every myLink into my excel cells with the http://www.
. I do not have to deal with any Replace statements -
Set myLinks = ie.document.getElementsByTagName("A")
For Each myLink In myLinks
Sheet1.Cells(i, "A").Value = myLink
Now xmlHttp is a lot faster and I would like to use it, but it too brings the myLink as is in the web page with this method -
Set html = CreateObject("htmlfile")
html.body.innerHTML = xmlHttp.ResponseText
Set myLinks = html.getElementsByTagName("A")
For Each myLink In myLinks
Sheet1.Cells(i, "A").Value = myLink
I tried the following but it doesn't work -
Set myLinks = xmlHttp.ResponseText.getElementsByTagName("A")
For Each myLink In myLinks
Sheet1.Cells(i, "A").Value = myLink
Still looking around but haven't found anything yet to bypass the html object to Set myLinks. Hence my question to elite members - is there a way to bypass the html object or is that a must for xmlHttp object? Appreciate any help or answer.