Remove filter prior to running code
Posted on 2013-10-31
I have a series of macros and code that manipulates data. Problem i have today is that if a user processes the data once, takes a look at what they did/happened filters the data, and then runs the code again it bombs. - Code wont run right if the data is filtered (multiple tables and pivots)
For the pivot tables i have no problems. I have some code that goes to the offending pivot table prior to the execution of the code and runs clears the filter(s)
for tables i have an issue. Prior to execution I run some code that goes to the worksheet that the table is on and clear the filters using:
Works fine as long as the data is filtered, if the data has not been filtered it throws an error...
I need to either be able to tell/determine if the data on a particular worksheet has been filtered and then run:
If data is filtered then
Or use a different method of unfiltering the data.