title: Submitting data via IE to an online MS Form is not working
body: <p>Can anyone figure out what I am doing wrong?</p>
  
  <p>When I try to submit data to an online MS Form the submission fails upon clicking the submit button because the data in the input text box disappears.</p>
  
  <p>The code I am using:</p>
  
  <pre><code>Sub Hello()
  
      Dim objIE As Object
      Dim URL As String
      Dim doc As HTMLDocument
  
      Dim oServ As Object
      Dim cProc As Variant
      Dim oProc As Object
  
      URL = "https://forms.office.com/Pages/ResponsePage.aspx?id=1tUOxOPgeU2DDHmR8zp8jnPOq1Zxq2ZMgF9BFdtxEI9UNTJUSlpaNVU3S0pYRDI0MzE3UkZZQzdZNi4u"
  
      Set objIE = CreateObject("InternetExplorer.Application")
      objIE.Visible = True
      objIE.navigate URL
      Do While objIE.Busy = True Or objIE.readyState &lt;&gt; 4: DoEvents: Loop
      Set doc = objIE.document
  
      Set oServ = GetObject("winmgmts:")
      Set cProc = oServ.ExecQuery("Select * from Win32_Process")
  
      Dim input_text As String
      input_text = "Hello!"
  
      doc.getElementsByTagName("input")(0).Value = input_text
      doc.getElementsByTagName("input")(0).setAttribute("value") = input_text
  
      'Let us wait 5 secconds to see if the text was entered into the textbox
      Application.Wait (Now() + TimeValue("00:00:05"))
  
      doc.getElementsByTagName("button")(2).Click
  
  
      'Let us wait 10 secconds to see the results before terminating IE
      Application.Wait (Now() + TimeValue("00:00:10"))
  
  
      Set objIE = Nothing
      For Each oProc In cProc
        If oProc.Name = "iexplore.exe" Then
            'MsgBox "KILL"   ' used to display a message for testing pur
            oProc.Terminate  'kill exe
        End If
      Next
  
  End Sub
  </code></pre>