Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ShowAll Data
Does anyone know how to check whether a filter is active
on a worksheet? I want to ensure that all data is on show before running a recorded macro. However if I try to "show all data" on a worksheet where there is no criteria set on a filter I get an error message. Any ideas on how to avoid this? Thanks, CiaraG |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ShowAll Data
If activesheet.filtermode then
activesheet.showalldata End if -- Regards, Tom Ogilvy "CiaraG" wrote in message ... Does anyone know how to check whether a filter is active on a worksheet? I want to ensure that all data is on show before running a recorded macro. However if I try to "show all data" on a worksheet where there is no criteria set on a filter I get an error message. Any ideas on how to avoid this? Thanks, CiaraG |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
ShowAll Data
Ciara,
Try this: Sub ShowAllData() Dim ws As Worksheet Set ws = ActiveSheet If ws.AutoFilterMode = True Then For Each afFilter In ws.AutoFilter.Filters If afFilter.On = True Then ws.AutoFilter.Parent.ShowAllData Exit For End If Next End If End Sub -- Charles www.officezealot.com "CiaraG" wrote in message ... Does anyone know how to check whether a filter is active on a worksheet? I want to ensure that all data is on show before running a recorded macro. However if I try to "show all data" on a worksheet where there is no criteria set on a filter I get an error message. Any ideas on how to avoid this? Thanks, CiaraG |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
ShowAll Data
this should work:
If ActiveSheet.AutoFilterMode And ActiveSheet.FilterMode Then ActiveSheet.ShowAllData chrs, john "CiaraG" wrote in message ... Does anyone know how to check whether a filter is active on a worksheet? I want to ensure that all data is on show before running a recorded macro. However if I try to "show all data" on a worksheet where there is no criteria set on a filter I get an error message. Any ideas on how to avoid this? Thanks, CiaraG |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Increase Your Business By Data Conversion, Data Format and Data EntryServices in India | Excel Worksheet Functions | |||
Save 20% On Data Conversion and Data Formats Services by Data EntryIndia | Excel Discussion (Misc queries) | |||
Data Entry Online, Data Format, Data Conversion and Data EntryServices through Data Entry Outsourcing | Excel Discussion (Misc queries) | |||
showall not working | Excel Discussion (Misc queries) | |||
MULTIPLE DATA - How to insert new data into existing data.... | Excel Discussion (Misc queries) |