Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 390
Default Controlling auto-filter with VBA

I have a question about controlling auto-filter with VBA and
need some help. I hope someone will oblige.

I know about Debra Dalgleish's excellent and very helpful
pages at http://www.contextures.com -- and specifically
the pages to do with auto-filters he
http://www.contextures.com/xlautofilter03.html#All

But I still am having a problem with Excel XP/2002.

Specifically, when I use the suggested code

Sub ShowAllRecords()
If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If
End Sub

if FilterMode was on but all data is already being shown,
I get an error message when I run the macro.

I can think of at least three ways to work around the issue.
But I'd like to know the suggested solution.

What I'm doing right now is (1) checking for


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default Controlling auto-filter with VBA

On Thursday, July 5, 2012 10:48:26 AM UTC-5, Dallman Ross wrote:
I have a question about controlling auto-filter with VBA and
need some help. I hope someone will oblige.

I know about Debra Dalgleish's excellent and very helpful
pages at http://www.contextures.com -- and specifically
the pages to do with auto-filters he
http://www.contextures.com/xlautofilter03.html#All

But I still am having a problem with Excel XP/2002.

Specifically, when I use the suggested code

Sub ShowAllRecords()
If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If
End Sub

if FilterMode was on but all data is already being shown,
I get an error message when I run the macro.

I can think of at least three ways to work around the issue.
But I'd like to know the suggested solution.

What I'm doing right now is (1) checking for


try
Sub showall()
On Error GoTo away
ActiveSheet.ShowAllData
away:
End Sub
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
Auto Filter - Custom Auto Filter Johnnyboy5 Excel Programming 4 August 2nd 09 09:36 AM
DataFilterAuto Filter in excel 2007? TIJ New Users to Excel 2 November 13th 08 03:28 AM
Controlling Auto filter MarkyB Excel Programming 0 June 25th 08 10:45 AM
Auto Count for Auto Filter Doesn't Function under certain circumst Jonathan Horvath Excel Discussion (Misc queries) 2 August 17th 07 03:51 AM
Excel auto filter doesn't recoginize case - won't filter AA from A Mikey Excel Discussion (Misc queries) 1 September 29th 05 08:18 PM


All times are GMT +1. The time now is 04:13 PM.

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"