title: Data capturing from webpage "POP UP" tables using VBA
body: <pre><code>Source = "https://otcportal.tax.ok.gov/gpx/gp_PublicSearchPUNbyLegal.php"
  objIE.Navigate Source
  
  Do While objIE.Busy = True Or objIE.readyState &lt;&gt; 4: DoEvents: Loop
  
  Set ele2 = objIE.document.getElementsByTagName("input")
  
  For Each opt In ele2
      If opt.getAttribute("value") = "PUN" Then
          opt.Focus
          opt.Click
          Exit For
      End If
  Next opt
  
  Application.Wait (Now + TimeValue("00:00:3"))
  Set ele3 = objIE.document.getElementsByTagName("input")
  
  For Each opt In ele3
      If opt.getAttribute("name") = "OTCtxtPUN" Then
          opt.Focus
          opt.Value = "073-055988-0-0000"
          Exit For
      End If
  Next opt
  
  Application.Wait (Now + TimeValue("00:00:3"))
  Set ele = objIE.document.getElementsByTagName("input")
  
  For Each opt In ele
      If opt.getAttribute("name") = "submit" Then
          opt.Focus
          opt.Click
          Exit For
      End If
  Next opt
  
  Application.Wait (Now + TimeValue("00:00:3"))
  Set ele5 = objIE.document.getElementsByTagName("a")
  For Each opt In ele5
      If opt.getAttribute("class") = "showDetails" Then
          opt.Focus
          opt.Click
          Exit For
      End If
  Next opt
  
  Application.Wait (Now + TimeValue("00:00:5"))
  i=i+1    
  loop
  
  End Sub
  </code></pre>
  
  <p><strong>pop up table</strong> </p>
  
  <p>Now at the end of running this code, I am getting a Pop-up table containing some data in different tabs. How to capture all the data from each tab in excel?</p>