View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Remove filter in worksheets before running code

Hi,

Sub Show_All()
For x = 1 To Worksheets.Count
If Sheets(x).FilterMode Then
Sheets(x).ShowAllData
End If
Next
End Sub

Mike

"gootroots" wrote:

How do I include all sheets in a workbook when running the following:

If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If

Thanks