Hi all,
I have a macro which successfully runs activated by a button, to apply an autofilter. This is the code:
Now I also want to hide the Autofilter arrows in row 10.
I have this code, which when I run, hides the arrows but also reverses the effect of the Autofilter (ie all my hidden rows appear again)
How do I get around this and hopefully hide the arrows in the same step as applying the autofilters?
Thanks in advance!
Richard
I have a macro which successfully runs activated by a button, to apply an autofilter. This is the code:
Code:
Sub ReduceOPCList()'
' ReduceOPCList Macro
' Reduce OPC List
'
'
ActiveSheet.AutoFilterMode = False
With ActiveSheet.Range("B10:I72")
.AutoFilter Field:=1, Criteria1:="<>0", Operator:=xlOr, Criteria2:="=***"
.AutoFilter Field:=8, Criteria1:="<>0", Operator:=xlOr, Criteria2:="=***"
End With
End Sub
Now I also want to hide the Autofilter arrows in row 10.
I have this code, which when I run, hides the arrows but also reverses the effect of the Autofilter (ie all my hidden rows appear again)
Code:
Sub HideArrows()'
' HideArrows Macro
' Hide all AutoFilter Arrows in Range
Dim c As Range
Dim i As Integer
Dim rng As Range
Set rng = Range("B10:I10")
i = rng.Cells(1, 1).Column - 1
Application.ScreenUpdating = False
For Each c In Range("B10:I10")
c.AutoFilter Field:=c.Column - i, _
Visibledropdown:=False
Next
Application.ScreenUpdating = True
End Sub
How do I get around this and hopefully hide the arrows in the same step as applying the autofilters?
Thanks in advance!
Richard