Problem writing text into search box

Option Explicit

 

Sub pratice()

 

    Dim IE As New SHDocVw.InternetExplorer

    Dim HTMLDoc As New MSHTML.HTMLDocument

    Dim HTMLInput As MSHTML.IHTMLElement

 

    IE.Visible = True

    IE.navigate “wiseowl.co.uk”

 

    Do While IE.readyState <> READYSTATE_COMPLETE

    Loop

 

    Set HTMLDoc = IE.document  ‘here where it stop running

 

    Set HTMLInput = HTMLDoc.getElementById(“what”)

 

    HTMLInput.Value = “excel vba”

 

 

End Sub

 

working the same code from the video

 

Code breaks at the set htmldoc = ie.document

It works in the youbtube video but doesnt work for my computer

anyone know why?

By: ziggy

Leave a Reply

Your email address will not be published. Required fields are marked *