title: selenium vba extracting data from web table last bit of code to copy text does not work
body: <p>I have been trying to import the table results from <a href="http://avionictools.com/icao.php" rel="nofollow noreferrer">http://avionictools.com/icao.php</a>
  using example Reg code is N2
  my code adds the Reg code and clicks the submit button , but I am unable to copy the results from the table. I wanted the hex code copying to column C  </p>
  
  <pre><code>Public Sub regsearch()
  Dim LR1, lr2 As Long, i As Long
  
  LR1 = Sheet1.Range("A" &amp; Rows.Count).End(xlUp).Row
  
  
  
  Dim data As String
  
  Dim bot As New WebDriver
  For i = 2 To 2
  Sheet1.Range("A" &amp; i).Copy 'Value is N2
  
  Set clipboard = GetObject("New:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
          With clipboard
              .GetFromClipboard
              data = .getText
          End With
          'MsgBox data
  bot.Start "chrome", "http://avionictools.com"
  
  
  bot.Wait 2000
  bot.get "/icao.php"
  bot.Wait 2000
  
  
  bot.FindElementByName("data").Click
  
  bot.SendKeys data
  bot.Wait 2000
  bot.FindElementByXPath("//div/input").Click
  
  
  
  bot.Wait 1000
  
  
  Set Table = bot.getElementsByTagName("table").Item(0)
  For Each Tr In Table.getElementsByTagName("tr")
      tdlen = Tr.getElementsByTagName("td").Length
  If tdlen &gt; 1 Then
      lr = Sheet2.Range("A" &amp; Rows.Count).End(xlUp).Row + 1
      Sheet1.Range("C" &amp; i).Value = Tr.getElementsByTagName("td").Item(0).innerText
      Sheet1.Range("D" &amp; i).Value = Tr.getElementsByTagName("td").Item(1).innerText
  Else
  
      End If
  
  
  Next Tr
  Application.Wait Now + TimeValue("00:00:04")
  
  
  Next
  End Sub
  </code></pre>