I am using this code:
It loops through the page to find any button with Ok in it, and then clicks it.
I only want it to click the 3rd button it loops through.
How do I apply this?
Code
Dim allelements As HtmlElementCollection = WebBrowser1.Document.All
For Each webpageelement As HtmlElement In allelements
If webpageelement.InnerHtml = "Ok" Then
webpageelement.InvokeMember("click")
Exit For
End If
NextIt loops through the page to find any button with Ok in it, and then clicks it.
I only want it to click the 3rd button it loops through.
How do I apply this?
![[Image: MbYfMNk.png]](https://i.imgur.com/MbYfMNk.png)

