title: Get value from web document input element with VBA
body: <p>I am having difficult to retrieve value <code>300</code> from the input named <code>points</code>.</p>
  
  <p>Here's my HTML and VBA code.</p>
  
  <p><strong>HTML</strong>:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;td id="myPower_val_9" style="visibility: visible;"&gt;
      &lt;input type="text" disabled="disabled" value="300" name="points"&gt;&lt;/input&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p><strong>VBA</strong>:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Dim ie As Object
  Dim myPoints As String
  
  Set ie = CreateObject("InternetExplorer.Application")
  
  With ie
    .Visible = 0
    .navigate "www.example.com"
  
     While .Busy Or .readyState &lt;&gt; 4 
     DoEvents
     Wend
  
  End With
  
  Dim Doc As HTMLDocument
  Set Doc = ie.document
  
  myPoints = Trim(Doc.getElementsByTagName("td")(0).getElementById("myPoints").innerText)
  Range("A1").Value = myPoints 
  </code></pre>