Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-05-2018, 04:00 AM
LearnerExcel LearnerExcel is offline How to write if condition for AutoFilter to check ..? Windows 7 32bit How to write if condition for AutoFilter to check ..? Office 2013
Advanced Beginner
How to write if condition for AutoFilter to check ..?
 
Join Date: Nov 2016
Posts: 82
LearnerExcel will become famous soon enoughLearnerExcel will become famous soon enough
Default How to write if condition for AutoFilter to check ..?

I am getting the following error while executing a Macro when the filter is not applied. But working quite nice when the filter is already applied. How can I write an if condition to check first whether the filter is applied or not, if applied then need to execute this macro else quit.

Error:
Run-time error '1004':
ShowAllData method of Worksheet class failed




Code:
Code:
Sub RemoveFilter()
ActiveSheet.ShowAllData
End Sub
Reply With Quote
  #2  
Old 05-05-2018, 08:53 AM
NoSparks NoSparks is offline How to write if condition for AutoFilter to check ..? Windows 7 64bit How to write if condition for AutoFilter to check ..? Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

https://msdn.microsoft.com/en-us/vba...property-excel
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I write if condition to get the values ... LearnerExcel Excel 3 12-15-2016 03:10 AM
write need help and copy write need help on another page auto wykoems Word 2 07-25-2013 07:56 AM
How to write if condition for AutoFilter to check ..? Sum on AutoFilter Grasshopper Excel 3 02-14-2013 01:41 AM
How to write if condition for AutoFilter to check ..? AutoFilter Criteria3 coxjamd Excel Programming 2 01-17-2013 02:24 PM
How to write if condition for AutoFilter to check ..? check with condition karti Word 2 03-15-2011 06:06 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:33 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft