willow1985
Well-known Member
- Joined
- Jul 24, 2019
- Messages
- 871
- Office Version
- 365
- Platform
- Windows
I have a code that shows all data on a filter but how can this code be modified to show all data AND remove the filter?
I have to use this multiple times throughout the code.
I have this code but can only use it once in my macro or I get an error:
Still have a lot to learn about VBA
Thank you
Carla
Code:
If (ActiveSheet.AutoFilterMode And ActiveSheet.FilterMode) Or ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
I have to use this multiple times throughout the code.
I have this code but can only use it once in my macro or I get an error:
Code:
Dim lo As ListObject
For Each lo In ActiveSheet.ListObjects
lo.AutoFilter.ShowAllData
Next lo
Still have a lot to learn about VBA
Thank you
Carla