M
Mia
Hi,
I´m trying to do a autofiltermacro that will work with different buttons.
It should work like this:
Button 1, Selects and filter field 5 and 32
Button 2, Selects and filter field 5 and 36
and so on.
The problem is that it only adds on. If I fist clicks on button 1 and then 2
field 32 still
is filtered. How should I do this?
BR
Mia
My code so far is:
Sub Amars()
'
' Amars Makro
'
'
ActiveSheet.Unprotect
ActiveSheet.ListObjects("Tabell1012").Range.AutoFilter Field:=5,
Criteria1 _
:="A"
ActiveSheet.ListObjects("Tabell1012").Range.AutoFilter Field:=36,
Criteria1 _
:="<>"
End Sub
I´m trying to do a autofiltermacro that will work with different buttons.
It should work like this:
Button 1, Selects and filter field 5 and 32
Button 2, Selects and filter field 5 and 36
and so on.
The problem is that it only adds on. If I fist clicks on button 1 and then 2
field 32 still
is filtered. How should I do this?
BR
Mia
My code so far is:
Sub Amars()
'
' Amars Makro
'
'
ActiveSheet.Unprotect
ActiveSheet.ListObjects("Tabell1012").Range.AutoFilter Field:=5,
Criteria1 _
:="A"
ActiveSheet.ListObjects("Tabell1012").Range.AutoFilter Field:=36,
Criteria1 _
:="<>"
End Sub