Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default Clear Auto Filter on Close (or open)

Hi,

How would I ensure that if Auto Filter is on, it is cleared when the
workbook is closed (or opened)? I'm not much of a programmer, but I can copy
and paste! :)

TIA
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Clear Auto Filter on Close (or open)

Does clear mean show all or remove the filter arrows?

I'm guessing that it means show all (but leave the arrows).

Put something like this in a General module:

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
If .FilterMode Then
.ShowAllData
End If
End With
End Sub

Change the sheet name to match what you need.


Karin wrote:

Hi,

How would I ensure that if Auto Filter is on, it is cleared when the
workbook is closed (or opened)? I'm not much of a programmer, but I can copy
and paste! :)

TIA


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default Clear Auto Filter on Close (or open)

Dave, Thank you, but it doesn't work. The auto filter remains on. In answer
to your question, I want the auto filter arrows to remain, but to clear any
filtering. I tried modifying your code with .autofiltermode but that didn't
change anything. (I did use my correct worksheet name, which is ClientList.)

"Dave Peterson" wrote:

Does clear mean show all or remove the filter arrows?

I'm guessing that it means show all (but leave the arrows).

Put something like this in a General module:

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
If .FilterMode Then
.ShowAllData
End If
End With
End Sub

Change the sheet name to match what you need.


Karin wrote:

Hi,

How would I ensure that if Auto Filter is on, it is cleared when the
workbook is closed (or opened)? I'm not much of a programmer, but I can copy
and paste! :)

TIA


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default Clear Auto Filter on Close (or open)

It worked! My bad...I didn't put it in a module. Thank you!

"Dave Peterson" wrote:

Does clear mean show all or remove the filter arrows?

I'm guessing that it means show all (but leave the arrows).

Put something like this in a General module:

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
If .FilterMode Then
.ShowAllData
End If
End With
End Sub

Change the sheet name to match what you need.


Karin wrote:

Hi,

How would I ensure that if Auto Filter is on, it is cleared when the
workbook is closed (or opened)? I'm not much of a programmer, but I can copy
and paste! :)

TIA


--

Dave Peterson

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
How to clear advanced filter in excel Prakash Shukla Excel Discussion (Misc queries) 1 March 16th 07 03:02 PM
Auto close userform AOU Excel Discussion (Misc queries) 0 December 28th 06 07:54 PM
Auto Open, Refresh, Save, Close Jimmycooker Excel Discussion (Misc queries) 0 February 6th 06 02:34 PM
Auto clear when qualification is met Paul987 Excel Discussion (Misc queries) 1 October 10th 05 02:53 PM
Excel auto filter doesn't recoginize case - won't filter AA from A Mikey Excel Discussion (Misc queries) 1 September 29th 05 09:18 PM


All times are GMT +1. The time now is 01:59 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"