Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am trying to write a function to uncheck the four filters within one hidden dropdown list, automatically the pages loads with the filters checked; below is the source code

XML
<select id="CaseStatus" class="filter dropcheck" dispWidth="167" chk="A"  multiplestyle="display:none">

          <option value="0,1">PreSale</option>
          <option value="2,3,4">Running</option>
          <option value="5">Sold</option>
          <option value="6">Canceled</option>


I have tried almost ever example within Google, please help
this is what I have so far

VB
Do
DoEvents
Loop Until MyBrowser.readyState = 4
Set optCollections = HTMLDoc.getElementsByTagName("option")
For Each opts In optCollections
If opts.innerText = "PreSale" Then
opts.Selected = True
End If
If opts.innerText = "Running" Then
opts.Selected = True
End If
If opts.innerText = "Sold" Then
opts.Selected = False
End If
If opts.innerText = "Canceled" Then
opts.Selected = False
HTMLDoc.all.testBut.Click
Exit For
End If
Next



Thank you
Posted
Updated 18-Nov-14 22:24pm
v2
Comments
Maciej Los 26-Nov-14 15:09pm    
Why VBA?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900