LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Clear autofilters?

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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transfer a name from one cell to another but leave clear if clear? Scoober Excel Worksheet Functions 3 May 22nd 09 02:55 AM
clear the clear the web page email attachment lines MCrider Excel Discussion (Misc queries) 0 November 11th 07 10:05 PM
AutoFilters Joli Excel Worksheet Functions 1 March 21st 06 09:14 PM
autofilters Diego Villaseñor Fernández Excel Worksheet Functions 0 January 13th 05 11:27 PM
Userforms and autofilters - Autofilters don't seen to work with userform No Name Excel Programming 3 August 28th 03 05:42 PM


All times are GMT +1. The time now is 11:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"