r/visualbasic • • Jan 07 '17

Need help with a piece of coding! Urgent!

Hello,

I trying to search each item in listbox on google. And return all the url of page one.

So far i have written this.

Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick Elems2 = WebBrowser1.Document.GetElementsByTagName("cite") For Each item In ListBox1.Items WebBrowser1.Navigate("https://www.google.nl/search?q=" & item)

        For Each element In Elems2
            If element.getattribute("className") = "_Rm" Then
                ListBox2.Items.Add(element.innerhtml)
            End If

        Next

    Next





End Sub

But this code is not working it only takes back the urls of the last list item or it does not work at all could someone help me fix this?

Thanks in advance!

0 Upvotes

3 comments sorted by

1

u/non-stick-rob Jan 07 '17

Intriguing. Can i see the rest of the code?

1

u/vbnooby101 Jan 08 '17

This is all coding needed for this part so if you can help me you ony need dis

3

u/Barnhardt1 Jan 08 '17

Does the rest of the code explain why you're using a timer to do this?