title: VBA Excel: Type value in <input> tag (using Id attribute)
body: <p>How can I type a value from a cell into an  tag using Id attribute?</p>
  
  <p>I have phew  tags in a webpage (see example below):</p>
  
  <pre><code>&lt;input id="myId" type="text" value= "2&gt;
  </code></pre>
  
  <p>I have the following code to search all  tags and when it finds the  tag with specific Id, I want to type the new value.</p>
  
  <pre><code>Set objInputCollection = IE.Document.getElementsByTagName("input")
  
  countInputObjects = 0
  Do While countInputObjects &lt; objInputCollection.Length
  
      Select Case objInputCollection(countInputObjects).ID
  
          Case "myId"
              ' Set value
              objInputCollection(countInputObjects).Value = Sheets("MySheet").Range("D15").Value
  
          Case "myID_2"
              ' Set "Range" value
              objInputCollection(countInputObjects).Value = Sheets("MySheet").Range("D10").Value
  
      End Select
  
      countInputObjects = countInputObjects + 1
  
  Loop
  </code></pre>
  
  <p>My code is not working and does not go into any "Case". </p>