IE Automation to select dropdown based on cell value

  • Hi all I have a web form to fill from a cell value from excel i cant use select by index. The scenario is in a webform dropdown there are dynamic names and I have a excel cell value containing names and it should read from cell value and update in form.
    Please help me to modify this code
    objIE.document.getElementById("ctl00_MainContent_userDDList").selectedIndex = 4

  • Try this, which searches the select dropdown for the required visible text and, if found, sets the select element's value property.


    The code requires a reference to MS HTML Object Library - set via Tools - References in VBA.


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!