#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default toolbar button

I've added a button on the toolbar to turn on Autofilter. How can I add
another button to turn Autofilter off?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default toolbar button

hi
Basically the same way you add the button to turn it off. Auto filter is
boolean. the same command that turns it on also (if on) turns it off.

regards
FSt1

"Dennis S." wrote:

I've added a button on the toolbar to turn on Autofilter. How can I add
another button to turn Autofilter off?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default toolbar button

There's a button that you can add (Show All) that shows all the hidden rows.

But I've never seen a built-in button that actually removes the arrows from the
header rows.

If you don't have any event macros running that kills undo, you may want to try
this.

Select the row with the headers.
hit the delete key on the keyboard
(It clears the contents and removes the arrows)
then hit ctrl-z (edit|Undo) to put the data back.



Dennis S. wrote:

I've added a button on the toolbar to turn on Autofilter. How can I add
another button to turn Autofilter off?


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 340
Default toolbar button

Dennis, take a look at the Filter Assistant at
http://www.add-ins.com/filtasst.htm. It will toggle filteringoff on a
column if it is filtered. If you select a cell on the top filtered row, and
the column is not filtered, it unfilters the worksheet.

Bob Flanagan
Macro Systems
144 Dewberry Drive
Hockessin, Delaware, U.S. 19707

Phone: 302-234-9857, cell 302-584-1771
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

"Dennis S." wrote in message
...
I've added a button on the toolbar to turn on Autofilter. How can I add
another button to turn Autofilter off?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default toolbar button

Hi Dennis

I got fed up with this being a one way operation also.
I added this macro to my Personal.xls

Sub AutoFiltOnOff()

Dim actCell As Range
Set actCell = ActiveCell
Application.ScreenUpdating = False
On Error Resume Next
Rows(ActiveCell.Row).Select
Selection.AutoFilter
actCell.Select
On Error GoTo 0
Application.ScreenUpdating = True

End Sub

Then whilst in Customise mode on the Toolbar, utilising the same icon
for the Autofilter,
right clickAssign MacroPersonal.xls!AutoFiltOnOff

The on error resume next is in case you click the button on a row with
no data, which would cause Autofilter to throw an error.
Setting actCell at the beginning, and selecting it at the end, prevents
an entire row selection, if the Resume Next has been invoked.

This quite happily toggles the Autofilter on and off for me.
--
Regards

Roger Govier


"Dennis S." wrote in message
...
I've added a button on the toolbar to turn on Autofilter. How can I
add
another button to turn Autofilter off?





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 91
Default toolbar button

I know that this has been answered loooong time ago but I read through it
for my problem and I ended up with a different solution.

I wanted the button to appear on the document itself for users who have no
idea how to use Excel. I recorded a macro which had me select the title row,
go to data then filter than autofilter (which turned the filter on) and then
selected the first cell of my data and turned the recorder off. I then
attached this macro to a button which I placed on the document. I only
needed one macro as running the macro again toggled the check mark to off.
Everytime the button is selected the filter turns off and on.

The purpose for this was for users who can't remember what they filtered on
to get back all of the records without having to use the toolbars. (I know
the arrow turns blue but they wanted something pretty foolproof)

"Dennis S." wrote:

I've added a button on the toolbar to turn on Autofilter. How can I add
another button to turn Autofilter off?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
New button on toolbar attaboy Excel Worksheet Functions 5 January 23rd 07 04:17 PM
Sum Button Toolbar Rugdoody Excel Discussion (Misc queries) 3 May 20th 06 12:38 AM
why does the toolbar have a button, $ and is said currency,it giv. Terry621 Excel Worksheet Functions 1 November 14th 05 05:38 PM
Fax Button on Standard Toolbar Bruce Excel Discussion (Misc queries) 1 April 19th 05 10:35 PM
How do I get the "repeat" button on a toolbar? D Excel Discussion (Misc queries) 3 January 13th 05 03:02 AM


All times are GMT +1. The time now is 10:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"