Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
HI everyone,
I happen to encounter a - in my eyes - really strange behaviour of excel in reaction to a macro. The sub in question should set an auto filter on a column to show all entries with a late smaller or equal to today. And in case the autofilter is already set deactivate it upon execution. However when I run the sub no rows at all are displayed even not those which should be. However when I look at the autofilter settings, change nothing and just press ok. Then it works as it should. So I wonder what's up here? I'd really appreciate input on this as I just ran out of ideas. Here is the code in question Sub ShowCurrentTasks() If (ActiveSheet.AutoFilter.Filters(4).On) Then Selection.AutoFilter Field:=4 Else Selection.AutoFilter Field:=4, Criteria1:="<=" & Date, Operator:=xlAnd End If End Sub Cheers, Lars |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Strange Page Break behaviour while AutoFilter enabled | Excel Discussion (Misc queries) | |||
Strange VBA Behaviour | Excel Programming | |||
Strange behaviour | Excel Worksheet Functions | |||
Strange behaviour in VBA Help | Excel Programming | |||
strange behaviour | Excel Programming |