KristianDude
Technical User
My last post was too confusing and I have figured out most of it but have this one perplexing issue... I am trying to click on a link with no tag using Internet Explorer. No new window, same window. I have to use the InnerText search as the url will change based on the 1st page zip code entered. Here is the sequence...
#1) Navigate to this address then vba enters a zip code, submits and then navigates to
#2) This is where I am trying to click on "3 Day History" with VBA but having a heck of a time!
Also, here is link info if it helps anything.. thanks!..
<a href=" Day History</a>
#1) Navigate to this address then vba enters a zip code, submits and then navigates to
#2) This is where I am trying to click on "3 Day History" with VBA but having a heck of a time!
Also, here is link info if it helps anything.. thanks!..
<a href=" Day History</a>
Code:
Dim HTMLDoc As HTMLDocument
Dim Element As HTMLLinkElement
Dim IeDoc As Object
Dim ElementCol As IHTMLElementCollection
Dim link As HTMLAnchorElement
Do
'Wait till the Browser is loaded
Loop Until oBrowser.readyState = READYSTATE_COMPLETE
'find 3 day
Set ElementCol = HTMLDoc.get("a")
For Each link In ElementCol
If InStr(Element.innerText, "3 Day History") = 1 Then
link.Click
Exit For
End If
Next link