![]() |
Macro / Autofilter / Show All Data
Hi,
I wrote in the macro ActiveSheet.ShowAllData but if no filtering is set, I get error message. Is it possible to say something like If 'filtered...' Thanks and regards, Cousin Excel |
Macro / Autofilter / Show All Data
The easiest way will be by adding:
On Error resume Next as the first command of the macro. Micky "CousinExcel" wrote: Hi, I wrote in the macro ActiveSheet.ShowAllData but if no filtering is set, I get error message. Is it possible to say something like If 'filtered...' Thanks and regards, Cousin Excel |
Macro / Autofilter / Show All Data
As On error may cause some other "problems" - try this:
If ActiveSheet.FilterMode Then ActiveSheet.ShowAllData Micky "מיכאל (מיקי) אבידן" wrote: The easiest way will be by adding: On Error resume Next as the first command of the macro. Micky "CousinExcel" wrote: Hi, I wrote in the macro ActiveSheet.ShowAllData but if no filtering is set, I get error message. Is it possible to say something like If 'filtered...' Thanks and regards, Cousin Excel |
Macro / Autofilter / Show All Data
If you want to remove the filter (and filter arrows):
With worksheets("Somesheetnamehere") .autofiltermode = false end with If you want to just show the data, but keep the arrows: With worksheets("Somesheetnamehere") if .filtermode then 'some filter is applied .showalldata end if end with CousinExcel wrote: Hi, I wrote in the macro ActiveSheet.ShowAllData but if no filtering is set, I get error message. Is it possible to say something like If 'filtered...' Thanks and regards, Cousin Excel -- Dave Peterson |
All times are GMT +1. The time now is 08:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com