Eawyne
New Member
- Joined
- Jun 28, 2021
- Messages
- 44
- Office Version
- 2013
- Platform
- Windows
Hi all,
okay, this is driving me nuts. I'm trying to apply a filter on a generated table via VBA, and I want several criterias to be used. I've come up with various methods, notably using this link https://docs.microsoft.com/fr-fr/office/vba/api/excel.range.autofilter
The one more approriate for my purpose seems to be the one using the Array variable.
The problem is that despite all indications of the contrary, the execution on my code stops at two criterias. I've found several instances of codes having four, five criterias, and people say it works, but I can only have two !
Could someone help me figure this out ? What am I missing here ? There's the XOR variable too, but this seems to have a limit as well - at least, adding Criteria3 doesn't yield any result.
(And I really hope it's not just me being a dumbass here...)
okay, this is driving me nuts. I'm trying to apply a filter on a generated table via VBA, and I want several criterias to be used. I've come up with various methods, notably using this link https://docs.microsoft.com/fr-fr/office/vba/api/excel.range.autofilter
The one more approriate for my purpose seems to be the one using the Array variable.
The problem is that despite all indications of the contrary, the execution on my code stops at two criterias. I've found several instances of codes having four, five criterias, and people say it works, but I can only have two !
VBA Code:
'Filtre les résultats /!\ Test
ActiveSheet.Range("A1:F200").AutoFilter _
Field:=4, _
Criteria1:=Array("*.pdf", "*.pptx", "*.xlsx"), _
Operator:=xlFilterValues
Could someone help me figure this out ? What am I missing here ? There's the XOR variable too, but this seems to have a limit as well - at least, adding Criteria3 doesn't yield any result.
(And I really hope it's not just me being a dumbass here...)