asleepdirka
New Member
Hello all,
I am trying to use VBA from excel to select an item from a drop down list on a webpage. There are two drop down lists on the page, and it is in the first list. I need to select the second option value below(1234variable-name.xls), which is the first selectable item in the list. This name is always changing each time I visit the page, so I need select it as the second item in the list, rather than by name. I've tried many different codes, but not working yet.
__________________Here is the HTML webpage code_____________________________
'
<div class= "Content">
<select name="ct100 style="width:220px; ">
<option value=” (Select a report) ”> (Select a report) </option>
<option value=”/MyCompanyDept/CompanyFile/MyCompanyDept/Reports/1234variable-name.xls” title=”4/10/2013 - My Company - ReportName”>4/10/2013 - My Company - Report Name</option>
<option value=”/MyCompanyDept/CompanyFile/MyCompanyDept/Reports/do not need this one.xls” title=”4/10/2013 - My Company – ReportName2”>4/10/2013 - My Company - Report Name2</option>
</select> <input type="button" id="btnGo" name="btnGo" value="Go" class="SmallButton"
onclick="viewReport()" />
</div>
'
THANKS FOR ANY HELP!
I am trying to use VBA from excel to select an item from a drop down list on a webpage. There are two drop down lists on the page, and it is in the first list. I need to select the second option value below(1234variable-name.xls), which is the first selectable item in the list. This name is always changing each time I visit the page, so I need select it as the second item in the list, rather than by name. I've tried many different codes, but not working yet.
__________________Here is the HTML webpage code_____________________________
'
<div class= "Content">
<select name="ct100 style="width:220px; ">
<option value=” (Select a report) ”> (Select a report) </option>
<option value=”/MyCompanyDept/CompanyFile/MyCompanyDept/Reports/1234variable-name.xls” title=”4/10/2013 - My Company - ReportName”>4/10/2013 - My Company - Report Name</option>
<option value=”/MyCompanyDept/CompanyFile/MyCompanyDept/Reports/do not need this one.xls” title=”4/10/2013 - My Company – ReportName2”>4/10/2013 - My Company - Report Name2</option>
</select> <input type="button" id="btnGo" name="btnGo" value="Go" class="SmallButton"
onclick="viewReport()" />
</div>
'
THANKS FOR ANY HELP!