View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Kevin Kevin is offline
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