title: Get data from Internet Explorer
body: <p>I am learning how to extract the source data from Internet Explorer. I have learned how to code it from YouTube. However, when I want to modify it to test another website, I encountered an error. Can anyone advise please?</p>
  
  <p>Tested website: <a href="http://www.oxforddictionaries.com" rel="nofollow">http://www.oxforddictionaries.com</a></p>
  
  <pre><code>Sub clickFormbutton()
  
  
  Dim ie As Object
  Dim form As Variant, button As Variant
  
  
  Set ie = CreateObject("InternetExplorer.Application")
  
  
  input1 = InputBox("Please enter keyword.")
  
  
  With ie
  
  .Visible = True
  .navigate ("http://www.oxforddictionaries.com")
  
  
  While ie.ReadyState &lt;&gt; 4
  DoEvents
  Wend
  
  
  ie.document.getelementsbyname("q").Item.innertext = input1
  
  
  Set form = ie.document.getElementsbytagname("form")
  
  Set button = form(0).onsubmit
  
  
  form(0).submit
  
  
  Do While ie.busy: DoEvents: Loop
  
  Set TDelements = .document.getElementsbytagname("td")
  r = 0
  c = 0
  
  For Each TDelement In TDelements
  Sheet1.Range("A1").Offset(r, c).Value = TDelement.innertext
  r = r + 1
  Next
  
  
  
  
  
  End With
  
  Set ie = Nothing
  
  
  
  
  
  End Sub
  </code></pre>