M McAllister
New Member
- Joined
- Apr 16, 2013
- Messages
- 15
Using Excel 2010 on Windows 7,
I have a workbook with many sheets, some of which contain more than 1 data data table that is fed by data connections.
I have the following code. When the code runs, if the cursor is within a table, the table's filters are cleared. But if the active cell is not in the table, then the tables filters are not cleared.
I want to loop through each table and clear any filter, if it exists.
How do I make this happen?
Any help is greatly appreciated.
Thank you,
Mathew
I have a workbook with many sheets, some of which contain more than 1 data data table that is fed by data connections.
I have the following code. When the code runs, if the cursor is within a table, the table's filters are cleared. But if the active cell is not in the table, then the tables filters are not cleared.
Code:
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
With ActiveSheet
If .FilterMode Or .AutoFilterMode Then
.ShowAllData
End If
End With
Next
I want to loop through each table and clear any filter, if it exists.
How do I make this happen?
Any help is greatly appreciated.
Thank you,
Mathew