I am trying to pull up some data from a webpage, which will help me to generate my report faster.
In order to pull up those data, I have to choose a drop down. I have tried to select the drop down but it's not working.
Could you please check the below code and suggest where I am dong wrong.
Sub getoptdt()
Dim ie As InternetExplorer
Dim html As HTMLDocument
Set ie = New InternetExplorer
ie.Visible = True
ie.navigate "website name"
Do While ie.busy = True
DoEvents
Loop
Set html = ie.document
Dim drp As HTMLFormElement
Set drp = html.getElementById("<wbr>c12ssdrdq")
drp.selectedIndex = 2
In order to pull up those data, I have to choose a drop down. I have tried to select the drop down but it's not working.
Could you please check the below code and suggest where I am dong wrong.
Sub getoptdt()
Dim ie As InternetExplorer
Dim html As HTMLDocument
Set ie = New InternetExplorer
ie.Visible = True
ie.navigate "website name"
Do While ie.busy = True
DoEvents
Loop
Set html = ie.document
Dim drp As HTMLFormElement
Set drp = html.getElementById("<wbr>c12ssdrdq")
drp.selectedIndex = 2