title: getElementByID search
body: <p>My question concerns searching for an element, titled, an 'input ID' type of element, on a webpage before next part of the code. My code, below, doesn't find the element and just keeps looping. </p>
  
  <pre><code>Dim Elem As Object
  
  Do
      Set Elem = Nothing
      Set Elem = document.all.getElementById("XXXXXX")
      DoEvents
  Loop While Elem Is Nothing
  
  ' Next part of code.
  </code></pre>
  
  <p>Thanks..</p>