Your not thinking at all about this. You get the same collection twice, not to mention not using the correct loop. (noted your not actually using a RTB as stated.
vb Code:
Public Class Form1
Private Sub SomeThing()
Dim resultsCollection As HtmlElementCollection = Me.WebBrowser1.Document.GetElementsByTagName("a")
Debug.WriteLine(resultsCollection.Count)
For Each element In resultsCollection
' what ever
Next
End Sub
End Class
vb Code:
Public Class Form1
Private Sub SomeThing()
Dim elements = Me.WebBrowser1.Document.GetElementsByTagName("a")
If elements IsNot Nothing Then
Dim items =
(
From el
In elements.Cast(Of HtmlElement)()
Where el.InnerText <> String.Empty
Select el.InnerText
)
Me.ListBox1.Items.AddRange(items.ToArray)
End If
End Sub
End Class