They seeem right but you need also to change the last line:
If mydic.Count > 0 Then ActiveSheet.AutoFilter.Range.AutoFilter Field:=5, Criteria1:=mydic.keys, Operator:=7
If still it doesn't work, try manually removing the autofilter before running the macro. You should only need to do this once (if it finds an autofilter in place it leaves it).
|