Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 8th, 2007, 02:33 AM
Authorized User
 
Join Date: Apr 2007
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default Remove Autofilter

Please guide how to remove the autofilter applied previously to the range of cells.

Yogesh
__________________
Yogesh
 
Old June 9th, 2007, 03:26 PM
Registered User
 
Join Date: May 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Yogesh,

You should first check if the Sheet has an Autofilter applied first, and if so, then all you have to do is just create an autofilter on any range to turn it off. Something like:
Code:
Sub TurnOffAutofilter()
    If Worksheets("Sheet1").AutoFilterMode = True Then _
        Worksheets("Sheet1").Range("A1").AutoFilter
End Sub
Hope this helps :)

 
Old June 11th, 2007, 03:58 AM
Authorized User
 
Join Date: Apr 2007
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks malik, i got the solution by using the bewlo statement.
ActiveSheet.AutoFilterMode = False

Yogesh
 
Old June 11th, 2007, 03:59 AM
Authorized User
 
Join Date: Apr 2007
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks malik, i got the solution by using the below statement.
ActiveSheet.AutoFilterMode = False

Yogesh
 
Old June 11th, 2007, 06:59 AM
Registered User
 
Join Date: May 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ah yes. Forgot about that.

Glad to see you got it going :)






Similar Threads
Thread Thread Starter Forum Replies Last Post
Enter Criteria Above Header To apply Autofilter stroggo Excel VBA 2 April 16th, 2008 03:35 AM
remove node asap XSLT 1 July 30th, 2006 03:01 AM
AutoFilter 5 columns at once Pindacko Excel VBA 0 April 26th, 2006 05:33 AM
Autofilter taking too much of time raaghu15 Excel VBA 2 March 4th, 2005 05:43 PM
How to remove ? abdusalam Javascript How-To 1 July 27th, 2004 01:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.