Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro - filter - show all data
Hi
I have the spreadsheet with the macro that does number of things, but I am not using it - only somebody else. The problem is that this person uses it then from time to time uses a filter and if data are filtered the macro crashes. I tried use "show all data" in the macro, but it crashes when there is not filter used. Is there a way to change the macro so if there is a filter used then unfilter it, but if not do not change anything? I am still on the learning curve with the VBA. -- Greatly appreciated Eva |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro - filter - 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 Eva wrote: Hi I have the spreadsheet with the macro that does number of things, but I am not using it - only somebody else. The problem is that this person uses it then from time to time uses a filter and if data are filtered the macro crashes. I tried use "show all data" in the macro, but it crashes when there is not filter used. Is there a way to change the macro so if there is a filter used then unfilter it, but if not do not change anything? I am still on the learning curve with the VBA. -- Greatly appreciated Eva -- Dave Peterson |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro - filter - show all data
Works like a charm!
Thank you very much -- Greatly appreciated Eva "Dave Peterson" wrote: 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 Eva wrote: Hi I have the spreadsheet with the macro that does number of things, but I am not using it - only somebody else. The problem is that this person uses it then from time to time uses a filter and if data are filtered the macro crashes. I tried use "show all data" in the macro, but it crashes when there is not filter used. Is there a way to change the macro so if there is a filter used then unfilter it, but if not do not change anything? I am still on the learning curve with the VBA. -- Greatly appreciated Eva -- Dave Peterson . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to show data based on pivottable filter? | Excel Discussion (Misc queries) | |||
Why don't all my data rows show up in auto-filter? | Excel Worksheet Functions | |||
Auto Filter does not show all the data in the column | Excel Worksheet Functions | |||
Why would Show All not be active in Filter part of Data menu? | Excel Worksheet Functions | |||
Shortcut Key for Data-Filter-Show All? | Excel Discussion (Misc queries) |