autofilter/programming?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all

I have this reminder list spreadsheet with tasks for people to do.. its pretty big. It has an autofilter turned on for all the columns on row 5 (this has those drop down menus for the columns that lets you select what you want to filter)... People open this spreadsheet and check their name for items/tasks to do.. and usually/somehow save the file by accident, etc... The next time the file is opened... it opens at the last spot it was saved at.. including what was filtered out

Is there anyway to make it so that the spreadsheet loads with the autofilter on (so that it allows for dropdown menus), but with "All" data visable?.. that is with "ALL" selected as the filter for all columns? (no specific filter turned on yet)
 
Try opening the workbook with someone's name selected. Then record th
macro of you selecting 'all' in the filter dropdown. View the code i
VBA, and cut and paste it into the "This workbook" section under th
'Microsoft Excel objects' folder. (This is the last object under Shee
1, Sheet 2, and Sheet 3 etc.)
I believe that any code in this section runs immediately when th
workbook is opened. This way, you can 'set' your filter to *all
initially. Having not tried this myself, you may want to add

Application.ScreenUpdating = false

before the code, and then

Application.ScreenUpdating = true

after. This will take out any screen flickering as the filter i
decompressed.


-gitcyphe
 
activesheet.columns("A:G").autofilter

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Terrel said:
Hello all,

I have this reminder list spreadsheet with tasks for people to do.. its
pretty big. It has an autofilter turned on for all the columns on row 5
(this has those drop down menus for the columns that lets you select what
you want to filter)... People open this spreadsheet and check their name
for items/tasks to do.. and usually/somehow save the file by accident,
etc... The next time the file is opened... it opens at the last spot it was
saved at.. including what was filtered out.
Is there anyway to make it so that the spreadsheet loads with the
autofilter on (so that it allows for dropdown menus), but with "All" data
visable?.. that is with "ALL" selected as the filter for all columns? (no
specific filter turned on yet)
 
thanks bob, that is much simpler than the code the recorded macro gave me...

went from like 19 lines to 1....hehe :P
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top