Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Autofilter - Toggles OFF ?

In a worksheet when opened I have a table with auto-filter turned on
(showing the drop-down arrows for each of the 15 fields).

When I run a macro to update the sheet, when complete the auto-filter
Is not applied. I immediately run the macro again, and the auto-filter
Is back -- So obviously with these lines of code this is the natural
occurrence.

.....
With ActiveSheet
.Range("A5").AutoFilter
End With

So I changed the above to:
Thinking the new line would always set the a/f to True,

With ActiveSheet
.Range("A5").AutoFilter
.FilterMode = True
End With

But it doesn't. What must I do to have auto-filter ALWAYS ON
After repeated runs of my macro?

Thanks for any help..


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default Autofilter - Toggles OFF ?

Hi Jim,

This will always keep your filter on, columns A to O

Sub AutoFilterOn()
If Sheets("Sheet1").AutoFilterMode = False Then
Range("A1:O1").AutoFilter
End Sub

Replace ("Sheet1") with the naem of your sheet and maybe change the
range to your column headers.

somethinglikeant
http://www.excel-ant.co.uk

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Autofilter - Toggles OFF ?

Somethinglikeant

Thanks so much, works great..
Appreciate the help
Jim

"somethinglikeant" wrote in message
oups.com:

Hi Jim,

This will always keep your filter on, columns A to O

Sub AutoFilterOn()
If Sheets("Sheet1").AutoFilterMode = False Then
Range("A1:O1").AutoFilter
End Sub

Replace ("Sheet1") with the naem of your sheet and maybe change the
range to your column headers.

somethinglikeant
http://www.excel-ant.co.uk


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
excel 2007 autofilter change to 2003 autofilter functionality? jonnybrovo815 Excel Discussion (Misc queries) 1 April 19th 10 10:05 PM
In EXCEL - inserting box that toggles between a check mark & not. Ran12577 Excel Worksheet Functions 1 November 4th 09 05:57 PM
Help: Scroll wheel toggles between up and down, and left and right - is driving me crazy Dab Excel Discussion (Misc queries) 3 March 14th 05 03:17 PM
Changing how cursor toggles. LSD Excel Discussion (Misc queries) 1 March 7th 05 05:13 PM
custom toolbar button that visually toggles in and out Paul Simon[_2_] Excel Programming 1 July 26th 03 10:35 PM


All times are GMT +1. The time now is 02:43 AM.

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

About Us

"It's about Microsoft Excel"