Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Show all data
Hi,
Do anyone know why this code don´t work? Sub ShowAllRecords() If ActiveSheet.FilterMode Then ActiveSheet.ShowAllData End If End Sub // Mia |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Show all data
You need to set
activesheet.filtermode=true |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Show all data
Maybe it's because you were filtering a list--not a range.
See your previous post. Mia wrote: Hi, Do anyone know why this code don´t work? Sub ShowAllRecords() If ActiveSheet.FilterMode Then ActiveSheet.ShowAllData End If End Sub // Mia -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Show all data
i've run into that problem if the autofilter is on, but no fields are actually
filtered. some the autofilter may be on and showalldata pops an error because showalldata is true to work around it, i use code like the 2 examples below. in the first instance, i have the autofilter turned on for columns A:E. it checks to see if there are any filtered columns, and if there is, it executes showalldata and exits. If ws.AutoFilterMode = True Then For i = 1 To 5 With ws.AutoFilter.Filters(i) If .On Then ws.ShowAllData Exit For End If End With Next End If you could probaby surround with on error statements, too. on error resume next ws.ShowAllData on error got to 0 -- Gary "Mia" wrote in message ... Hi, Do anyone know why this code don´t work? Sub ShowAllRecords() If ActiveSheet.FilterMode Then ActiveSheet.ShowAllData End If End Sub // Mia |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Show all data
Thank you again Dave!
// Mia "Dave Peterson" skrev: Maybe it's because you were filtering a list--not a range. See your previous post. Mia wrote: Hi, Do anyone know why this code don´t work? Sub ShowAllRecords() If ActiveSheet.FilterMode Then ActiveSheet.ShowAllData End If End Sub // Mia -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivot Tables: Don't show data for detail, but still show subtotals | Excel Worksheet Functions | |||
Data Labels- POssible to show data value and data label together? | Charts and Charting in Excel | |||
Pivot tables - how to show only show data or < $10k | Excel Discussion (Misc queries) | |||
show 3 sets of data per data point in a scatter plot | Charts and Charting in Excel | |||
how do i sort a worksheet data to show repetitve data and show | Excel Worksheet Functions |