title: Get elements by tag name VBA
body: <p>I'm trying to get the value <code>this_is_the_text_i_need_to_get</code> out the following HTML source code:</p>
  
  <pre><code>&lt;div class="blubrBoxContent"&gt;
       &lt;input id="url" type="text" name="__url" 
               value="this_is_the_text_i_need_to_get"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This is the VBA code that I've got so far:</p>
  
  <pre><code>Set TDelements = HTMLdoc.getElementsByTagName("div")
  
  For Each TDelement In TDelements
      If TDelement.ID = "url" Then
           MyVar = TDelement.innerText("Value")
      End if
  Next
  </code></pre>
  
  <p>The thing is that I can't make the code to go into the <code>If</code> statement. It looks like <code>ID</code> is not a property of the <code>TDelement</code>.</p>