VBA_Selecting Filter on Site

Pankil

New Member
Joined
Aug 1, 2019
Messages
16
Hello guys,




  • i am working on project where i need vba code to click on "Add Filter", code here looks like -

<div class="select-filter-field no-filters" ng-class="{'no-filters' : currentOptions.length === 0}" ng-click="addFilter()">
<i class="fa fa-fw fa-filter"></i>
Add filter
</div>

event is also there which shows like -

function(e) {
return void 0 !== T && T.event.triggered !== e.type ? T.event.dispatch.apply(t, arguments) : void 0
}



  • after clicking on said "Add filter" small list opens up and i require to click on say 4th item. code is -

<li class="filter-type-option" ng-repeat="field in ::filterFields" ng-click="setFilterField(filter, field)" ng-hide="filterFieldApplied(field.field)">
<i class="fa fa-fw fa-calendar" ng-class="field.icon"></i>
Date
</li>

again event is like -

function(e) {
return void 0 !== T && T.event.triggered !== e.type ? T.event.dispatch.apply(t, arguments) : void 0
}

Thanks in advance........
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
It seems the code found the desired control; try clicking it with this code:

Code:
col(0).click
 
Last edited:
Upvote 0
· You are welcome.
· Your question has a second part, so, try to get the list with this class name: ="filter-type-option"
· Not sure if it will work, since it is a list item and I am not seeing all the code.
· Does the list resemble the image below? If it does not contain sensitive data, can you post a screenshot of it?
· Also, can you post more code lines above and below the list code shown at the first post?

mGSR2ZH.png
<strike></strike>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,271
Members
452,628
Latest member
dd2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top