LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 504
Default VB to clear any filters when closing a spreadsheet

Hi

I want to enter some vb to a Workbook_BeforeClose option that automatically
clears any filters in a specific sheet as the workbook is closed. Example of
recorded code is below which works but I have the sheet protected so I do not
believe below code is optimal for a protected sheet. Is there simple code to
simply clear any filters?

Range("A1").Select
Selection.AutoFilter
Selection.AutoFilter
--
Kevin
 
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 all filters in worksheet for all columns Helios Excel Discussion (Misc queries) 2 November 11th 07 11:19 PM
How can I clear all cells containing #n/a on a spreadsheet? haynheart Excel Worksheet Functions 4 November 3rd 07 03:19 PM
Closing Excel spreadsheet Project 13 Excel Discussion (Misc queries) 0 September 19th 07 04:58 PM
CLEAR FIND BUFFER UPON CLOSING Chris in NH Excel Worksheet Functions 0 July 6th 05 06:39 PM
Dialog box when closing an unsaved spreadsheet Kathy4080 Excel Discussion (Misc queries) 1 January 4th 05 10:28 PM


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