Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default AdvancedFilter property?

I need a way to clear any and all AdvancedFilter on a worksheet so that all
rows are displayed. I've tried the ShowAllData method and it works fine as
long as there are filtered rows on the sheet. But the method fails if there
are no filtered rows.

Is there a way ShowAllData regardless of whether rows are filtered? If not,
is there a way to check for AdvancedFilter--a sort of AdvancedFilter property?

Many thanks.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default AdvancedFilter property?

Take a look at this:
http://www.contextures.com/xlautofilter03.html


--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Ted M H" wrote:

I need a way to clear any and all AdvancedFilter on a worksheet so that all
rows are displayed. I've tried the ShowAllData method and it works fine as
long as there are filtered rows on the sheet. But the method fails if there
are no filtered rows.

Is there a way ShowAllData regardless of whether rows are filtered? If not,
is there a way to check for AdvancedFilter--a sort of AdvancedFilter property?

Many thanks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default AdvancedFilter property?

Hi
Just suppress the error

On Error Resume Next 'required if Advanced filter used
.ShowAllData
On Error GoTo 0
.AutoFilterMode = False 'Removes drop down arrows

regards
Paul

On May 11, 3:55*pm, Ted M H wrote:
I need a way to clear any and all AdvancedFilter on a worksheet so that all
rows are displayed. *I've tried the ShowAllData method and it works fine as
long as there are filtered rows on the sheet. *But the method fails if there
are no filtered rows.

Is there a way ShowAllData regardless of whether rows are filtered? *If not,
is there a way to check for AdvancedFilter--a sort of AdvancedFilter property?

Many thanks.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,069
Default AdvancedFilter property?

In a project long ago, I had problems with ShowAllData, which I worked around
like this:

On Error Resume Next
'Unhide all rows first.
ActiveSheet.ShowAllData
'In case ShowAllData doesn't work, unhide all rows.
ActiveSheet.Cells.EntireRow.Hidden = False
On Error GoTo My_ErrorHandler

Hope this helps,

Hutch

"Ted M H" wrote:

I need a way to clear any and all AdvancedFilter on a worksheet so that all
rows are displayed. I've tried the ShowAllData method and it works fine as
long as there are filtered rows on the sheet. But the method fails if there
are no filtered rows.

Is there a way ShowAllData regardless of whether rows are filtered? If not,
is there a way to check for AdvancedFilter--a sort of AdvancedFilter property?

Many thanks.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default AdvancedFilter property?


You can check the worksheet's FilterMode property - if it's True then
ShowAllData.


Ted M H;721279 Wrote:

I need a way to clear any and all AdvancedFilter on a worksheet so that
all
rows are displayed. I've tried the ShowAllData method and it works

fine as
long as there are filtered rows on the sheet. But the method fails if

there
are no filtered rows.

Is there a way ShowAllData regardless of whether rows are filtered? If

not,
is there a way to check for AdvancedFilter--a sort of AdvancedFilter

property?

Many thanks.



--
aflatoon

Regards,
A.
------------------------------------------------------------------------
aflatoon's Profile: http://www.thecodecage.com/forumz/member.php?u=1501
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=201955

http://www.thecodecage.com/forumz



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default AdvancedFilter property?

Thanks for the information. The autofilter stuff is mostly irrelevant to my
question, which is about advanced filter.

"ryguy7272" wrote:

Take a look at this:
http://www.contextures.com/xlautofilter03.html


--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Ted M H" wrote:

I need a way to clear any and all AdvancedFilter on a worksheet so that all
rows are displayed. I've tried the ShowAllData method and it works fine as
long as there are filtered rows on the sheet. But the method fails if there
are no filtered rows.

Is there a way ShowAllData regardless of whether rows are filtered? If not,
is there a way to check for AdvancedFilter--a sort of AdvancedFilter property?

Many thanks.



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default AdvancedFilter property?

Thanks a million for the quick replies. I ended up going with the on error
resume next option. I didn't realize that the worksheet.filtermode property
applied to either autofilter or advanced filter. Now I know.
Much obliged.

"Ted M H" wrote:

I need a way to clear any and all AdvancedFilter on a worksheet so that all
rows are displayed. I've tried the ShowAllData method and it works fine as
long as there are filtered rows on the sheet. But the method fails if there
are no filtered rows.

Is there a way ShowAllData regardless of whether rows are filtered? If not,
is there a way to check for AdvancedFilter--a sort of AdvancedFilter property?

Many thanks.



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default AdvancedFilter property?

...If not, is there a way to check for AdvancedFilter...?

If you would have looked through the code samples at the link that Ryan
provided, I think you might have found the answer to the above question in
the "Turn On Excel AutoFilter" example.

--
Rick (MVP - Excel)



"Ted M H" wrote in message
...
Thanks for the information. The autofilter stuff is mostly irrelevant to
my
question, which is about advanced filter.

"ryguy7272" wrote:

Take a look at this:
http://www.contextures.com/xlautofilter03.html


--
Ryan---
If this information was helpful, please indicate this by clicking
''Yes''.


"Ted M H" wrote:

I need a way to clear any and all AdvancedFilter on a worksheet so that
all
rows are displayed. I've tried the ShowAllData method and it works
fine as
long as there are filtered rows on the sheet. But the method fails if
there
are no filtered rows.

Is there a way ShowAllData regardless of whether rows are filtered? If
not,
is there a way to check for AdvancedFilter--a sort of AdvancedFilter
property?

Many thanks.



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default AdvancedFilter property?

Hi Rick,

I'm not sure what your point is, but I sure don't see the answer in these
code samples. The Turn on Excel AutoFilter example definitely does not
provide the answer. Again, my question was about Advanced Filter and the
AutoFilterMode property has nothing to do with Advanced Filter.

Thanks for your interest, though.

"Rick Rothstein" wrote:

...If not, is there a way to check for AdvancedFilter...?


If you would have looked through the code samples at the link that Ryan
provided, I think you might have found the answer to the above question in
the "Turn On Excel AutoFilter" example.

--
Rick (MVP - Excel)



"Ted M H" wrote in message
...
Thanks for the information. The autofilter stuff is mostly irrelevant to
my
question, which is about advanced filter.

"ryguy7272" wrote:

Take a look at this:
http://www.contextures.com/xlautofilter03.html


--
Ryan---
If this information was helpful, please indicate this by clicking
''Yes''.


"Ted M H" wrote:

I need a way to clear any and all AdvancedFilter on a worksheet so that
all
rows are displayed. I've tried the ShowAllData method and it works
fine as
long as there are filtered rows on the sheet. But the method fails if
there
are no filtered rows.

Is there a way ShowAllData regardless of whether rows are filtered? If
not,
is there a way to check for AdvancedFilter--a sort of AdvancedFilter
property?

Many thanks.



.

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 464
Default AdvancedFilter property?

You can use;

Sub RemoveFilters()
On Error Resume Next
Sheet1.ShowAllData
On Error GoTo 0
End Sub



--
Regards
Dave Hawley
www.ozgrid.com
"Ted M H" wrote in message
...
Hi Rick,

I'm not sure what your point is, but I sure don't see the answer in these
code samples. The Turn on Excel AutoFilter example definitely does not
provide the answer. Again, my question was about Advanced Filter and the
AutoFilterMode property has nothing to do with Advanced Filter.

Thanks for your interest, though.

"Rick Rothstein" wrote:

...If not, is there a way to check for AdvancedFilter...?


If you would have looked through the code samples at the link that Ryan
provided, I think you might have found the answer to the above question
in
the "Turn On Excel AutoFilter" example.

--
Rick (MVP - Excel)



"Ted M H" wrote in message
...
Thanks for the information. The autofilter stuff is mostly irrelevant
to
my
question, which is about advanced filter.

"ryguy7272" wrote:

Take a look at this:
http://www.contextures.com/xlautofilter03.html


--
Ryan---
If this information was helpful, please indicate this by clicking
''Yes''.


"Ted M H" wrote:

I need a way to clear any and all AdvancedFilter on a worksheet so
that
all
rows are displayed. I've tried the ShowAllData method and it works
fine as
long as there are filtered rows on the sheet. But the method fails
if
there
are no filtered rows.

Is there a way ShowAllData regardless of whether rows are filtered?
If
not,
is there a way to check for AdvancedFilter--a sort of AdvancedFilter
property?

Many thanks.



.




  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default AdvancedFilter property?

Please accept my profuse apology... I read your reference to "Advanced
Filter" and my mind's eye saw "AutoFilter". I had just been doing some stuff
with AutoFilter which, I guess, conditioned me to think "Auto" when I saw
the word "Advanced"... very strange.

--
Rick (MVP - Excel)



"Ted M H" wrote in message
...
Hi Rick,

I'm not sure what your point is, but I sure don't see the answer in these
code samples. The Turn on Excel AutoFilter example definitely does not
provide the answer. Again, my question was about Advanced Filter and the
AutoFilterMode property has nothing to do with Advanced Filter.

Thanks for your interest, though.

"Rick Rothstein" wrote:

...If not, is there a way to check for AdvancedFilter...?


If you would have looked through the code samples at the link that Ryan
provided, I think you might have found the answer to the above question
in
the "Turn On Excel AutoFilter" example.

--
Rick (MVP - Excel)



"Ted M H" wrote in message
...
Thanks for the information. The autofilter stuff is mostly irrelevant
to
my
question, which is about advanced filter.

"ryguy7272" wrote:

Take a look at this:
http://www.contextures.com/xlautofilter03.html


--
Ryan---
If this information was helpful, please indicate this by clicking
''Yes''.


"Ted M H" wrote:

I need a way to clear any and all AdvancedFilter on a worksheet so
that
all
rows are displayed. I've tried the ShowAllData method and it works
fine as
long as there are filtered rows on the sheet. But the method fails
if
there
are no filtered rows.

Is there a way ShowAllData regardless of whether rows are filtered?
If
not,
is there a way to check for AdvancedFilter--a sort of AdvancedFilter
property?

Many thanks.



.

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
AdvancedFilter dannibrook Excel Programming 4 April 25th 06 11:19 AM
Advancedfilter ram Excel Programming 1 December 30th 05 02:18 AM
AdvancedFilter with VBA newToExcel Excel Programming 2 September 30th 05 05:20 PM
AdvancedFilter in VB loopy[_6_] Excel Programming 1 June 22nd 05 03:24 PM
AdvancedFilter to Array Witek[_2_] Excel Programming 0 April 23rd 05 07:19 PM


All times are GMT +1. The time now is 05:48 AM.

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"