Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am filtering my data, based on user input. But I need a way to reset the filters, here is some example code. Say I filter by one, then reset the data by using Spreadsheet1.ActiveSheet.ShowAllData then they try to filter by "2". Problem is that it includes "1" and "2". How can I fix this? Thanks With Me.Spreadsheet1.ActiveWorkbook.ActiveSheet Set owcAutoFilter = .autoFilter With owcAutoFilter With .Filters(1).Criteria .FilterFunction = ssFilterFunctionInclude .Add "1" End With .Apply End With Set owcAutoFilter = Nothing End With |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just to add to this, I tried to shut the autofilter off and then on
again to clear the filter doesn't seem to work. Using this code 'OFF Me.Spreadsheet1.ActiveSheet.AutoFilterMode = False 'ON Me.Spreadsheet1.ActiveSheet.UsedRange.autoFilter |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Errr... love it when I figure it out after I post. I was saving my
input in an array and wasn't resetting it. thanks have a nice day. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you just want to reset one filter: -
Selection.AutoFilter Field:=1 you will have to change the field number as appropiate -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200601/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Transfer a name from one cell to another but leave clear if clear? | Excel Worksheet Functions | |||
clear the clear the web page email attachment lines | Excel Discussion (Misc queries) | |||
AutoFilters | Excel Worksheet Functions | |||
autofilters | Excel Worksheet Functions | |||
Userforms and autofilters - Autofilters don't seen to work with userform | Excel Programming |