Our training courses

Other training resources

Our training venues

Why we are different

Details for Smithy58

Smithy58 has participated in the following threads:

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?

Regards

Colin

 

Added by Smithy58 on 29 Feb 2020 at 17:17

Hi Andrew

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?

Sub GetHTMLDocument()

    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
    IE.navigate "wiseowl.co.uk"
   
    Do While IE.ReadyState <> READYSTATE_COMPLETE
   
    Loop

    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
    Next HTMLButton
   
End Sub

 

Thanks in advance

Colin

 

Head office

Kingsmoor House

Railway Street

GLOSSOP

SK13 2AA

London

Landmark Offices

99 Bishopsgate

LONDON

EC2M 3XD

Manchester

Holiday Inn

25 Aytoun Street

MANCHESTER

M1 3AE

© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.

End of small page here
Please be aware that our website uses cookies!
I'm OK with this Tell me more ...