Details for Smithy58Smithy58 has participated in the following threads:
Added by Smithy58 on 29 Feb 2020 at 17:17
I am very impressed with the web scraping course and it is presented very well. i am however a bit stuck on the code where it stops on the For HTMLButton ... loop stating an object is required. I have been over the code and cannot see anything different to what you have in the video, can you please help on this?
Dim IE As New SHDocVw.InternetExplorer
Dim HTMLDoc As MSHTML.HTMLDocument
Dim HTMLInput As MSHTML.IHTMLElement
Dim HTMLButtons As MSHTML.IHTMLElementCollection
Dim HTMLButton As MSHTML.IHTMLElement
IE.Visible = True
Do While IE.ReadyState <> READYSTATE_COMPLETE
Set HTMLDoc = IE.Document
Set HTMLInput = HTMLDoc.getElementById("what")
HTMLInput.Value = "Excel VBA"
Set HTMLBittons = HTMLDoc.getElementsByTagName("button")
For Each HTMLButton In HTMLButtons
Debug.Print HTMLButton.className, HTMLButton.tagName, HTMLButton.ID, HTMLButton.innerText
Thanks in advance
Added by Smithy58 on 03 Mar 2020 at 16:34
Hi i was wondering if you have anything on scraping websites using Chrome and Excel VBA?