ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Auto Filter Toolbar Button Does not Toggle (https://www.excelbanter.com/excel-discussion-misc-queries/116286-auto-filter-toolbar-button-does-not-toggle.html)

Pastel Hughes

Auto Filter Toolbar Button Does not Toggle
 
My preference, as far as shortcuts are concerned, mostly involves toolbar
buttons.
There is one to reset all filters to "Show All".
There is one to switch the Auto Filter On,
but there appears to be no Toolbar button to switch Auto-Filter off
completely.
It would make sense to me to be able to use one button to toggle the Auto
Filter.
Is there a way of creating such a button (in VB)?

Dave Peterson

Auto Filter Toolbar Button Does not Toggle
 
I cheat.

I select the row with the headers.
I hit the delete key. The data in those header cells is erased and the
autofilter arrows removed.
I hit ctrl-z to put the data back.

Be careful.

Pastel Hughes wrote:

My preference, as far as shortcuts are concerned, mostly involves toolbar
buttons.
There is one to reset all filters to "Show All".
There is one to switch the Auto Filter On,
but there appears to be no Toolbar button to switch Auto-Filter off
completely.
It would make sense to me to be able to use one button to toggle the Auto
Filter.
Is there a way of creating such a button (in VB)?


--

Dave Peterson

Gord Dibben

Auto Filter Toolbar Button Does not Toggle
 
Sub Clear_Filter()
On Error GoTo whoops
Selection.AutoFilter
Exit Sub
whoops:
MsgBox "no range selected"
End Sub

Toggles AF on/off


Gord Dibben MS Excel MVP

On Thu, 26 Oct 2006 11:35:01 -0700, Pastel Hughes
wrote:

My preference, as far as shortcuts are concerned, mostly involves toolbar
buttons.
There is one to reset all filters to "Show All".
There is one to switch the Auto Filter On,
but there appears to be no Toolbar button to switch Auto-Filter off
completely.
It would make sense to me to be able to use one button to toggle the Auto
Filter.
Is there a way of creating such a button (in VB)?




All times are GMT +1. The time now is 01:31 AM.

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