ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Removing filters from data (https://www.excelbanter.com/excel-programming/438975-removing-filters-data.html)

Philip J Smith

Removing filters from data
 
Hi.

I have recorded a macro to remove filters from data lasts in advance of
performing other actions.

However if the data is unfiltered the macro falls over with the message
Run time error '1004' ShowAllData method of Worksheet class failed.

I think I need some sort of if error continue code or something to check
filtering
first.

I would be grateful if someone could point me in the right direction please.

Jacob Skaria

Removing filters from data
 
Hi Philip

Try

If Activesheet.Filtermode Then ActiveSheet.ShowAllData

--
Jacob


"Philip J Smith" wrote:

Hi.

I have recorded a macro to remove filters from data lasts in advance of
performing other actions.

However if the data is unfiltered the macro falls over with the message
Run time error '1004' ShowAllData method of Worksheet class failed.

I think I need some sort of if error continue code or something to check
filtering
first.

I would be grateful if someone could point me in the right direction please.



All times are GMT +1. The time now is 08:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com