Using VBA Excel to navigate a website by changing dropdown value

前端 未结 1 799
无人及你
无人及你 2020-12-19 22:22

I am writing an Excel macro that will navigate to a utility company website and then download all of the statements linked to that account. To get to the statement download

相关标签:
1条回答
  • 2020-12-19 22:33

    Once you set the index of dropdown you need to trigger the change event.

    select name="ctl00$PageContent$AccountDropDown$BillingAccountsDropDown" onchange="javascript:setTimeout('__doPostBack(\'ctl00$PageContent$AccountDropDown$BillingAccountsDropDown\',\'\')', 0)" id="ctl00_PageContent_AccountDropDown_BillingAccountsDropDown" style="width:250px;"

    doc.getElementById("xs_r_gender").selectedindex=1
    doc.getElementById("xs_r_gender").FireEvent("onchange")
    
    0 讨论(0)
提交回复
热议问题