View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
golf4 golf4 is offline
external usenet poster
 
Posts: 27
Default Question on Removal of Column Filtering Upon Closing of Spreadsheet

Hi, guys -

Just wanted to post a thank-you note for all the help. It's fantastic
to be able to post queries here and obtain so much valuable
assistance.

Thanks again.

Golf


Dave Peterson wrote in message ...
If you fix up the workbook when it's opened, it might be easier:

In a general module,

If you want to just show all the data (keep the dropdown arrows):

Option Explicit
Sub Auto_open()
Dim wks As Worksheet
For Each wks In ThisWorkbook.Worksheets
With wks
If .AutoFilterMode Then
If .FilterMode Then
.ShowAllData
End If
End If
End With
Next wks
End Sub


If you want to eliminate the dropdown arrows completely:

Option Explicit
Sub auto_open()
Dim wks As Worksheet
For Each wks In ThisWorkbook.Worksheets
wks.AutoFilterMode = False
Next wks
End Sub

golf4 wrote:

Hi, everyone -

I have a quick question regarding a detailed spreadsheet that I have
created. My spreadsheet track vacancy days for a local housing agency.
Data entry field include aspects like Vacate Date, Re-Rent Date, Work
Order Created Date, Specific Program, Caseworker Name, etc.

Right now, I have turned on the Auto-Filter on all of the columns so
that we can filter out vacated units by program, by caseworker, etc.
The problem that we're having is that, once an employee does some
filtering and saves the spreadsheet, the next time it's opened the
filter is still filtering the same data. Employees that are not,
necessarily familiar with Excel, can't really tell all of the units
that are included on the spreadsheet unless they "unfilter" the
column(s).

I was wondering whether someone could help with some VB code that,
upon saving or closing the spreadsheet, the filtering will be removed
from all of the columns but won't turn off the Auto-Filter? If it will
help, I would, certainly, be willing to forward my spreadsheet if it
will provide clarification on what I'm talking about.

Thanks, again, for all the help.

Golf