ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   ShowAllData (https://www.excelbanter.com/excel-discussion-misc-queries/22053-showalldata.html)

Pat

ShowAllData
 
When a macro runs and it performs a filter/showall request the code stops on
the line:

ActiveSheet.ShowAllData

What needs to be changed so that this request is always performed regardless
if the sheet is not currently filtered.

Thanks if you can help.
Pat



Dave Peterson

If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If

Pat wrote:

When a macro runs and it performs a filter/showall request the code stops on
the line:

ActiveSheet.ShowAllData

What needs to be changed so that this request is always performed regardless
if the sheet is not currently filtered.

Thanks if you can help.
Pat


--

Dave Peterson

Trevor Shuttleworth

Pat

maybe just use:

Selection.AutoFilter

as a toggle

Regards

Trevor


"Pat" wrote in message
...
When a macro runs and it performs a filter/showall request the code stops
on the line:

ActiveSheet.ShowAllData

What needs to be changed so that this request is always performed
regardless if the sheet is not currently filtered.

Thanks if you can help.
Pat




Pat

Thank you gentlemen for your help. I found Dave's solution best suited for
this task.

Cheers
Pat
"Trevor Shuttleworth" wrote in message
...
Pat

maybe just use:

Selection.AutoFilter

as a toggle

Regards

Trevor


"Pat" wrote in message
...
When a macro runs and it performs a filter/showall request the code stops
on the line:

ActiveSheet.ShowAllData

What needs to be changed so that this request is always performed
regardless if the sheet is not currently filtered.

Thanks if you can help.
Pat







All times are GMT +1. The time now is 07:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com