View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
HelpExcel.com[_2_] HelpExcel.com[_2_] is offline
external usenet poster
 
Posts: 39
Default autofilters on worksheets within workbook

Cheryl,

You can use code similar to the following to accomplish this:

Sub removeFilter()

Dim rng As Range

For Each sht In ThisWorkbook.Sheets

Set rng = sht.Range("a1")
rng.AutoFilter

Next

End Sub

--
Regards,
Eddie
http://www.HelpExcel.com


"cheryl" wrote:

i'm using Excel 2007. I have about 12 worksheets within a workbook.

I want to know how I can clear the filters on all worksheets and return each
worksheet to showing all records without going through each worksheet
individually and clearing the filter.

ie. can I click or do something just once that will clear the filters in all
worksheets, or do I have to go to each s/sheet and clear the filter???

if this can only be done as a programming code, as i'm not really that
smart, can you please tell me where I have to put this code.
--
thanks
Cheryl