Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have some quite complex filters and am trying to make the spreadsheet more
user friendly. I have included a button to restore the Show All Data using the VBA: ActiveSheet.ShowAllData This works, but only if there has been a filter applied. If the user clicks the button again (without a filter being present) I get the following error message - "Run Time error 1004 - ShowAllData method of Worksheet class failed". How can I stop this error message, or better still advise the user (MSGBOX?) that all the data is currently being shown? Thank you for your help. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
maybe something like this
If ActiveSheet.AutoFilterMode = True Then ActiveSheet.ShowAllData End If -- Gary "B Baggins" wrote in message ... I have some quite complex filters and am trying to make the spreadsheet more user friendly. I have included a button to restore the Show All Data using the VBA: ActiveSheet.ShowAllData This works, but only if there has been a filter applied. If the user clicks the button again (without a filter being present) I get the following error message - "Run Time error 1004 - ShowAllData method of Worksheet class failed". How can I stop this error message, or better still advise the user (MSGBOX?) that all the data is currently being shown? Thank you for your help. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if activesheet.filtermode then
activesheet.showAlldata End if -- Regards, Tom Ogilvy "B Baggins" wrote: I have some quite complex filters and am trying to make the spreadsheet more user friendly. I have included a button to restore the Show All Data using the VBA: ActiveSheet.ShowAllData This works, but only if there has been a filter applied. If the user clicks the button again (without a filter being present) I get the following error message - "Run Time error 1004 - ShowAllData method of Worksheet class failed". How can I stop this error message, or better still advise the user (MSGBOX?) that all the data is currently being shown? Thank you for your help. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
sorry, should have posted this
If ActiveSheet.FilterMode = True Then ActiveSheet.ShowAllData End If -- Gary "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... maybe something like this If ActiveSheet.AutoFilterMode = True Then ActiveSheet.ShowAllData End If -- Gary "B Baggins" wrote in message ... I have some quite complex filters and am trying to make the spreadsheet more user friendly. I have included a button to restore the Show All Data using the VBA: ActiveSheet.ShowAllData This works, but only if there has been a filter applied. If the user clicks the button again (without a filter being present) I get the following error message - "Run Time error 1004 - ShowAllData method of Worksheet class failed". How can I stop this error message, or better still advise the user (MSGBOX?) that all the data is currently being shown? Thank you for your help. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Makro2()
If ActiveSheet.FilterMode = False Then MsgBox "No filter !" ElseIf ActiveSheet.FilterMode = True Then ActiveSheet.ShowAllData Else MsgBox "unknown case" End If End Sub |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks everyone - works perfectly
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
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 |