I am trying to create IEautomation through vba-excel for the following link.
URL: http://qpldocs.dla.mil/search/default.aspx
The code includes search for the string "QPL-631",and click on the corresponding java script link MIL-I-631D(6).When I inspected "MIL-I-631D(6)" link ,I found following source code of href tag
<a href="javascript:__doPostBack('search_list$DG$ctl03$ctl00','')">MIL-I-631D(6)</a>
So there are no click options for the href
link and the address of manual clicking on href
link is completely different than href address.So I am stuck here.I would like to add a code that clicks "MIL-I-631D(6)" and outputs the results.
I have tried the below code and so far and unable to proceed further.
Private Sub IE_Autiomation()
Dim i As Long
Dim IE As Object
Dim objElement As Object
Dim objCollection As Object
Dim ae As HTMLLinkElement
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.navigate "http://qpldocs.dla.mil/search/default.aspx"
Application.StatusBar = "Loading. Please wait..."
Do While IE.Busy = True Or IE.readyState <> 4: DoEvents: Loop
Application.StatusBar = "Search form submission. Please wait..."
IE.document.getElementById("Search_panel1_tbox").Value = "QPL-631"
IE.document.getElementById("Search_panel1_btn").Click
Do While IE.Busy = True Or IE.readyState <> 4: DoEvents: Loop