VBA code to click on Form Dropdown from IE

蹲街弑〆低调 提交于 2019-12-12 01:56:17

问题


I am trying to automate some bit of IE, I'm successfully so far but got stuck with clicking on a dropdown from the IE dropdown as it is having a change event. I was able to click on the dropdown but unable to make the selection from the dropdown.

The code I'm trying to input the value is working but change event is not working.

HTML.getElementById("TAT_Deaprtment_REASSIGN_DIALOG_FACILITY_AUTOCOMPLETE").Value = "DropDownValuetobeselected"

The code I'm trying to click on the dropdown is working, but unable to make the selecetion and trigger change event.

Set addressInput = HTML.getElementById("TAT_ARROW")
addressInput.Focus
addressInput.Click

Below the screenshot of the IE dropdown form

IE Dropdown Screenshot

Below is the source code:-

<TD class=IconArea><A id=TAT_ARROW href="javascript:void(0)" jQuery1480509731310="51"></A></TD>

<SELECT onchange=";processDialog('CMD_REFRESH_DIALOG', 'ETQ$DIALOG_PARENT_TYPE=DOCUMENT&amp;REFRESH_FIELD_NAME=TAT_Deaprtment_REASSIGN_DIALOG_FACILITY', 'TAT_Deaprtment_REASSIGN_DIALOG_FACILITY');" onfocus="window.status=unescape('Field name is TAT_Deaprtment_REASSIGN_DIALOG_FACILITY');" onblur="window.status='';" class=FormField style="DISPLAY: none" size=1 name=TAT_Deaprtment_REASSIGN_DIALOG_FACILITY optionsLoaded="true"><OPTION class=FormField value=39>DropDownValuetobeselected</OPTION><OPTION class=FormField selected value="">&nbsp;</OPTION></SELECT>

Also Posted Here:- Link

来源:https://stackoverflow.com/questions/40889982/vba-code-to-click-on-form-dropdown-from-ie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!