I´m completely new at working with VBA and html and I hope someone could help me.
In the website that I need to get information there´s a dropdown list and an input box which changes according to the option selected in the droplist.
With my VBA I´m able to make the dropdown list option change, but the input box wont change, it stays the same as the default option.
This is the code I´m running
Dim ie As New SHDocVw.InternetExplorer
Dim HTMLDoc As MSHTML.HTMLDocument
Dim HMTLInputs As MSHTML.IHTMLElementCollection
Dim HTMLInput As MSHTML.IHTMLElement
ie.Visible = True
ie.navigate "myURL"
Do While ie.readyState <> READYSTATE_COMPLETE
Loop
Set HTMLDoc = ie.document
HTMLDoc.getElementById("zkComp62").Click
HTMLDoc.getElementById("zkComp66").Click
Set seleccion = HTMLDoc.getElementById("zkComp118")
seleccion.selectedIndex = 3
and this is the hmtl code that I get from the website if I run the code
Buscar por: | Fecha de activación Cliente No. de Cliente Contrato Estatus Distribuidor | Inicio: Fin: |
But if I manually click on the option that I need in the website, the last td in the code changes and looks like this
Buscar por: | Fecha de activación Cliente No. de Cliente Contrato Estatus Distribuidor |
I´ve looked in other answers but I cant find something that works for my code.
I´ve already tried with FireEvent but I doesn´t change anything and also with getelementsbyID("").focus but still I can´t make it work.
Thanks