R
RB Smissaert
Using Excel 2000 to 2003, but developing in 2003.
I want to set an autofilter in the sheet in VBA. I don't want to set any
filter, but just make the filter
arrows show. The problem is if there is a filter in place already, hiding
some rows.
From postings to this group I thought that ActiveSheet.AutoFilterMode =
False should clear any filter, but it
doesn't. So when there is a filter in place say "female" and I do:
ActiveSheet.AutoFilterMode = False
'also tried Sleep(500) here
Selection.AutoFilter
I expected to see all the rows, but this is not the case.
I also tried:
If ActiveSheet.AutoFilterMode = True Then
Selection.AutoFilter 'to toggle off
'also tried Sleep(500) here
Selection.AutoFilter 'to toggle on
Else
Selection.AutoFilter
End If
But that doesn't work either.
How do I solve this?
RBS
I want to set an autofilter in the sheet in VBA. I don't want to set any
filter, but just make the filter
arrows show. The problem is if there is a filter in place already, hiding
some rows.
From postings to this group I thought that ActiveSheet.AutoFilterMode =
False should clear any filter, but it
doesn't. So when there is a filter in place say "female" and I do:
ActiveSheet.AutoFilterMode = False
'also tried Sleep(500) here
Selection.AutoFilter
I expected to see all the rows, but this is not the case.
I also tried:
If ActiveSheet.AutoFilterMode = True Then
Selection.AutoFilter 'to toggle off
'also tried Sleep(500) here
Selection.AutoFilter 'to toggle on
Else
Selection.AutoFilter
End If
But that doesn't work either.
How do I solve this?
RBS